Skip to content

Commit 1020078

Browse files
authored
Update configure.yml
1 parent f63c822 commit 1020078

File tree

1 file changed

+33
-13
lines changed

1 file changed

+33
-13
lines changed

.github/workflows/configure.yml

+33-13
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,54 @@ on: [push]
55
permissions: write-all
66

77
jobs:
8-
config-and-maintain:
9-
#if: ${{ !contains (github.repository, '/mta-sts-template') }}
8+
configure:
109
runs-on: ubuntu-latest
10+
defaults:
11+
run:
12+
shell: bash
13+
1114
steps:
12-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@v4
1316
with:
1417
# by default, it uses a depth of 1
1518
# this fetches all history so that we can read each commit
1619
fetch-depth: 0
1720
ref: ${{ github.head_ref }}
1821

19-
- run: echo "REPOSITORY_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}' | tr '-' '_' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
20-
shell: bash
22+
- run: |
23+
echo "REPOSITORY_NAME=$(
24+
echo '${{ github.repository }}' \
25+
| awk -F '/' '{print $2}' \
26+
| tr '-' '_' \
27+
| tr '[:upper:]' '[:lower:]' \
28+
)" >> $GITHUB_ENV
2129
2230
- run: echo "REPOSITORY_URLNAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV
23-
shell: bash
2431

2532
- run: echo "REPOSITORY_OWNER=$(echo '${{ github.repository }}' | awk -F '/' '{print $1}')" >> $GITHUB_ENV
26-
shell: bash
2733

28-
- name: Is this still a template
29-
id: is_template
30-
run: echo "::set-output name=is_template::$(ls .github/template.yml &> /dev/null && echo true || echo false)"
34+
- run: echo "IS_TEMPLATE=$(ls .github/template.yml &> /dev/null && echo true || echo false)" >> $GITHUB_ENV
35+
36+
- uses: actions/setup-python@v5
37+
with:
38+
python-version: '3.12'
3139

32-
- name: Rename the project
33-
# if: steps.is_template.outputs.is_template == 'true'
40+
- name: Test configuration
41+
if: env.IS_TEMPLATE == 'true'
3442
run: |
3543
echo "Repo owner: ${{ env.REPOSITORY_OWNER }}"
3644
echo "Repo name: ${{ env.REPOSITORY_NAME }}"
3745
echo "Repo URL: ${{ env.REPOSITORY_URLNAME }}"
38-
echo "Template: ${{ steps.is_template.outputs.is_template }}"
46+
echo "Template: ${{ env.IS_TEMPLATE }}"
47+
48+
export SKIP_TLS_CHECK="False"
49+
export MTASTS_DOMAIN="digital.cabinet-office.gov.uk"
50+
python bin/configure.py
51+
52+
cat CNAME
53+
cat .well-known/*
54+
55+
- name: Push changes
56+
if: env.IS_TEMPLATE != 'true'
57+
run: |
58+
echo "Would push changes..."

0 commit comments

Comments
 (0)