33
33
name :should-deploy
34
34
runs-on :ubuntu-latest
35
35
outputs :
36
- verdict :${{ steps.check.outputs.verdict }}
36
+ verdict :${{ steps.check.outputs.verdict }} # DEPLOY or NOOP
37
37
steps :
38
38
-name :Harden Runner
39
39
uses :step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
@@ -49,28 +49,27 @@ jobs:
49
49
-name :CHECKOUT MAIN
50
50
run :|
51
51
set -euxo pipefail
52
+ git fetch origin
52
53
git checkout main
53
54
git checkout origin/dean/releases-freeze -- scripts/should_deploy.sh
54
55
55
56
-name :Check if deploy is enabled
56
57
id :check
57
58
run :|
58
59
set -euo pipefail
59
- verdict="false"
60
- if ./scripts/should_deploy.sh; then
61
- verdict="true"
62
- fi
60
+ verdict="$(./scripts/should_deploy.sh)"
63
61
echo "verdict=$verdict" >> "$GITHUB_OUTPUT"
64
62
65
63
deploy :
66
64
name :" deploy"
67
65
runs-on :ubuntu-latest
68
66
timeout-minutes :30
69
67
needs :should-deploy
70
- if :needs.should-deploy.outputs.verdict == 'true '
68
+ if :needs.should-deploy.outputs.verdict == 'DEPLOY '
71
69
permissions :
72
70
contents :read
73
71
id-token :write
72
+ packages :write # to retag image as dogfood
74
73
steps :
75
74
-name :Harden Runner
76
75
uses :step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
@@ -108,7 +107,7 @@ jobs:
108
107
uses :fluxcd/flux2/action@6bf37f6a560fd84982d67f853162e4b3c2235edb # v2.6.4
109
108
with :
110
109
# Keep this and the github action up to date with the version of flux installed in dogfood cluster
111
- version :" 2.6.4 "
110
+ version :" 2.7.0 "
112
111
113
112
-name :Get Cluster Credentials
114
113
uses :google-github-actions/get-gke-credentials@3da1e46a907576cefaa90c484278bb5b259dd395 # v3.0.0