Skip to content

Commit a27e38c

Browse files
committed
parent f6d9be9
author Deniz Cengiz <d.c.cengiz@googlemail.com> 1721251923 +0200 committer Deniz Cengiz <d.c.cengiz@googlemail.com> 1721254682 +0200 Add missing step output for variable reuse Update appstoreconnect link for validation error hint to new URL
1 parent f6d9be9 commit a27e38c

File tree

2 files changed

+23
-22
lines changed

2 files changed

+23
-22
lines changed

.github/workflows/build_loop.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,14 @@ jobs:
101101
name: Check upstream and keep alive
102102
outputs:
103103
NEW_COMMITS: ${{ steps.sync.outputs.has_new_commits }}
104+
ABORT_SYNC: ${{ steps.check_branch.outputs.ABORT_SYNC }}
104105

105106
steps:
106107
- name: Check if running on main or dev branch
107-
id: check_branch
108108
if: |
109109
needs.check_alive_and_permissions.outputs.WORKFLOW_PERMISSION == 'true' &&
110110
(vars.SCHEDULED_BUILD != 'false' || vars.SCHEDULED_SYNC != 'false')
111+
id: check_branch
111112
run: |
112113
if [ "${GITHUB_REF##*/}" = "main" ]; then
113114
echo "Running on main branch"
@@ -318,4 +319,4 @@ jobs:
318319
name: build-artifacts
319320
path: |
320321
artifacts
321-
buildlog
322+
buildlog

.github/workflows/validate_secrets.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ jobs:
1616
id: access-token
1717
run: |
1818
# Validate Access Token
19-
19+
2020
# Ensure that gh exit codes are handled when output is piped.
2121
set -o pipefail
22-
22+
2323
# Define patterns to validate the access token (GH_PAT) and distinguish between classic and fine-grained tokens.
2424
GH_PAT_CLASSIC_PATTERN='^ghp_[a-zA-Z0-9]{36}$'
2525
GH_PAT_FINE_GRAINED_PATTERN='^github_pat_[a-zA-Z0-9]{22}_[a-zA-Z0-9]{59}$'
26-
26+
2727
# Validate Access Token (GH_PAT)
2828
if [ -z "$GH_PAT" ]; then
2929
failed=true
@@ -65,12 +65,12 @@ jobs:
6565
echo "has_workflow_permission=true" >> $GITHUB_OUTPUT
6666
fi
6767
fi
68-
68+
6969
# Exit unsuccessfully if secret validation failed.
7070
if [ $failed ]; then
7171
exit 2
7272
fi
73-
73+
7474
validate-match-secrets:
7575
name: Match-Secrets
7676
needs: validate-access-token
@@ -81,10 +81,10 @@ jobs:
8181
- name: Validate Match-Secrets
8282
run: |
8383
# Validate Match-Secrets
84-
84+
8585
# Ensure that gh exit codes are handled when output is piped.
8686
set -o pipefail
87-
87+
8888
# If a Match-Secrets repository does not exist, attempt to create one.
8989
if ! visibility=$(gh repo view ${{ github.repository_owner }}/Match-Secrets --json visibility | jq --raw-output '.visibility | ascii_downcase'); then
9090
echo "A '${{ github.repository_owner }}/Match-Secrets' repository could not be found using the GH_PAT secret. Attempting to create one..."
@@ -103,12 +103,12 @@ jobs:
103103
else
104104
echo "Found a private '${{ github.repository_owner }}/Match-Secrets' repository to use."
105105
fi
106-
106+
107107
# Exit unsuccessfully if secret validation failed.
108108
if [ $failed ]; then
109109
exit 2
110110
fi
111-
111+
112112
validate-fastlane-secrets:
113113
name: Fastlane
114114
needs: [validate-access-token, validate-match-secrets]
@@ -124,18 +124,18 @@ jobs:
124124
steps:
125125
- name: Checkout Repo
126126
uses: actions/checkout@v4
127-
127+
128128
- name: Install Project Dependencies
129129
run: bundle install
130130

131131
# Sync the GitHub runner clock with the Windows time server (workaround as suggested in https://github.com/actions/runner/issues/2996)
132132
- name: Sync clock
133133
run: sudo sntp -sS time.windows.com
134-
134+
135135
- name: Validate Fastlane Secrets
136136
run: |
137137
# Validate Fastlane Secrets
138-
138+
139139
# Validate TEAMID
140140
if [ -z "$TEAMID" ]; then
141141
failed=true
@@ -147,34 +147,34 @@ jobs:
147147
failed=true
148148
echo "::error::The TEAMID secret is set but invalid. Verify that it is set correctly (only uppercase letters and numbers) and try again."
149149
fi
150-
150+
151151
# Validate MATCH_PASSWORD
152152
if [ -z "$MATCH_PASSWORD" ]; then
153153
failed=true
154154
echo "::error::The MATCH_PASSWORD secret is unset or empty. Set it and try again."
155155
fi
156-
156+
157157
# Ensure that fastlane exit codes are handled when output is piped.
158158
set -o pipefail
159-
159+
160160
# Validate FASTLANE_ISSUER_ID, FASTLANE_KEY_ID, and FASTLANE_KEY
161161
FASTLANE_KEY_ID_PATTERN='^[A-Z0-9]+$'
162162
FASTLANE_ISSUER_ID_PATTERN='^\{?[A-F0-9a-f]{8}-[A-F0-9a-f]{4}-[A-F0-9a-f]{4}-[A-F0-9a-f]{4}-[A-F0-9a-f]{12}\}?$'
163-
163+
164164
if [ -z "$FASTLANE_ISSUER_ID" ] || [ -z "$FASTLANE_KEY_ID" ] || [ -z "$FASTLANE_KEY" ]; then
165165
failed=true
166166
[ -z "$FASTLANE_ISSUER_ID" ] && echo "::error::The FASTLANE_ISSUER_ID secret is unset or empty. Set it and try again."
167167
[ -z "$FASTLANE_KEY_ID" ] && echo "::error::The FASTLANE_KEY_ID secret is unset or empty. Set it and try again."
168168
[ -z "$FASTLANE_KEY" ] && echo "::error::The FASTLANE_KEY secret is unset or empty. Set it and try again."
169169
elif [ ${#FASTLANE_KEY_ID} -ne 10 ]; then
170170
failed=true
171-
echo "::error::The FASTLANE_KEY_ID secret is set but has wrong length. Verify that you copied it correctly from the 'Keys' tab at https://appstoreconnect.apple.com/access/api and try again."
171+
echo "::error::The FASTLANE_KEY_ID secret is set but has wrong length. Verify that you copied it correctly from the 'Keys' tab at https://appstoreconnect.apple.com/access/integrations/api and try again."
172172
elif ! [[ $FASTLANE_KEY_ID =~ $FASTLANE_KEY_ID_PATTERN ]]; then
173173
failed=true
174-
echo "::error::The FASTLANE_KEY_ID secret is set but invalid. Verify that you copied it correctly from the 'Keys' tab at https://appstoreconnect.apple.com/access/api and try again."
174+
echo "::error::The FASTLANE_KEY_ID secret is set but invalid. Verify that you copied it correctly from the 'Keys' tab at https://appstoreconnect.apple.com/access/integrations/api and try again."
175175
elif ! [[ $FASTLANE_ISSUER_ID =~ $FASTLANE_ISSUER_ID_PATTERN ]]; then
176176
failed=true
177-
echo "::error::The FASTLANE_ISSUER_ID secret is set but invalid. Verify that you copied it correctly from the 'Keys' tab at https://appstoreconnect.apple.com/access/api and try again."
177+
echo "::error::The FASTLANE_ISSUER_ID secret is set but invalid. Verify that you copied it correctly from the 'Keys' tab at https://appstoreconnect.apple.com/access/integrations/api and try again."
178178
elif ! echo "$FASTLANE_KEY" | openssl pkcs8 -nocrypt >/dev/null; then
179179
failed=true
180180
echo "::error::The FASTLANE_KEY secret is set but invalid. Verify that you copied it correctly from the API Key file (*.p8) you downloaded and try again."
@@ -190,7 +190,7 @@ jobs:
190190
echo "::error::Unable to create a valid authorization token for the App Store Connect API. Verify that the FASTLANE_ISSUER_ID, FASTLANE_KEY_ID, and FASTLANE_KEY secrets are set correctly and try again."
191191
fi
192192
fi
193-
193+
194194
# Exit unsuccessfully if secret validation failed.
195195
if [ $failed ]; then
196196
exit 2

0 commit comments

Comments
 (0)