@@ -5,34 +5,54 @@ on: [push]
5
5
permissions : write-all
6
6
7
7
jobs :
8
- config-and-maintain :
9
- # if: ${{ !contains (github.repository, '/mta-sts-template') }}
8
+ configure :
10
9
runs-on : ubuntu-latest
10
+ defaults :
11
+ run :
12
+ shell : bash
13
+
11
14
steps :
12
- - uses : actions/checkout@v3
15
+ - uses : actions/checkout@v4
13
16
with :
14
17
# by default, it uses a depth of 1
15
18
# this fetches all history so that we can read each commit
16
19
fetch-depth : 0
17
20
ref : ${{ github.head_ref }}
18
21
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
21
29
22
30
- run : echo "REPOSITORY_URLNAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV
23
- shell : bash
24
31
25
32
- run : echo "REPOSITORY_OWNER=$(echo '${{ github.repository }}' | awk -F '/' '{print $1}')" >> $GITHUB_ENV
26
- shell : bash
27
33
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'
31
39
32
- - name : Rename the project
33
- # if: steps.is_template.outputs.is_template == 'true'
40
+ - name : Test configuration
41
+ if : env.IS_TEMPLATE == 'true'
34
42
run : |
35
43
echo "Repo owner: ${{ env.REPOSITORY_OWNER }}"
36
44
echo "Repo name: ${{ env.REPOSITORY_NAME }}"
37
45
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