1212 ACME_SERVER_URL : https://acme-v02.api.letsencrypt.org/directory
1313 AWS_MAX_ATTEMPTS : 100
1414 AWS_RETRY_MODE : adaptive
15+ NIX_INSTALL_SHA : e9d447ce3d2ff62d7ff9cb6ef401de6fa8acb148839dd00f7271945d7b638b14
16+ NIX_INSTALL_VERSION : 2.34.7
1517
1618permissions : write-all
1719
@@ -21,48 +23,13 @@ jobs:
2123 outputs :
2224 release_pr : ${{ steps.release-please.outputs.pr }}
2325 steps :
24- - uses : googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4
26+ # https://github.com/googleapis/release-please-action/releases
27+ - uses : googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0
2528 id : release-please
2629 with :
2730 release-type : terraform-module
28- - name : Install Let's Encrypt Roots and Intermediate Certificates
29- if : steps.release-please.outputs.pr
30- run : |
31- # https://letsencrypt.org/certificates/
32- sudo apt-get update -y
33- sudo apt-get install -y ca-certificates wget openssl libssl-dev
34- wget https://letsencrypt.org/certs/isrgrootx1.pem # rsa
35- sudo cp isrgrootx1.pem /usr/local/share/ca-certificates/
36- wget https://letsencrypt.org/certs/isrg-root-x2.pem # ecdsa
37- sudo cp isrg-root-x2.pem /usr/local/share/ca-certificates/
38- wget https://letsencrypt.org/certs/2024/r11.pem
39- sudo cp r11.pem /usr/local/share/ca-certificates/
40- wget https://letsencrypt.org/certs/2024/r10.pem
41- sudo cp r10.pem /usr/local/share/ca-certificates/
42- wget https://letsencrypt.org/certs/2024/e5.pem
43- sudo cp e5.pem /usr/local/share/ca-certificates/
44- wget https://letsencrypt.org/certs/2024/e6.pem
45- sudo cp e6.pem /usr/local/share/ca-certificates/
46- sudo update-ca-certificates
47- - name : Verify Lets Encrypt CA Functionality
48- if : steps.release-please.outputs.pr
49- run : |
50- # Function to check if Let's Encrypt CA is effectively used by openssl
51- check_letsencrypt_ca() {
52- # Try to verify a known Let's Encrypt certificate (you can use any valid one)
53- if openssl s_client -showcerts -connect letsencrypt.org:443 < /dev/null | openssl x509 -noout -issuer | grep -q "Let's Encrypt"; then
54- return 0 # Success
55- else
56- return 1 # Failure
57- fi
58- }
59- if check_letsencrypt_ca; then
60- echo "Let's Encrypt CA is functioning correctly."
61- else
62- echo "Error: Let's Encrypt CA is not being used for verification."
63- exit 1
64- fi
65- - uses : actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
31+ # https://github.com/actions/github-script/releases
32+ - uses : actions/github-script@d746ffe35508b1917358783b479e04febd2b8f71 # v9.0.0
6633 if : steps.release-please.outputs.pr
6734 with :
6835 github-token : ${{secrets.GITHUB_TOKEN}}
@@ -80,12 +47,14 @@ jobs:
8047 if : needs.release.outputs.release_pr
8148 runs-on : ubuntu-latest
8249 steps :
50+ # https://github.com/actions/checkout/releases
8351 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
8452 with :
8553 token : ${{secrets.GITHUB_TOKEN}}
8654 fetch-depth : 0
8755 - id : aws-creds
88- uses : aws-actions/configure-aws-credentials@ec61189d14ec14c8efccab744f656cffd0e33f37 # v6
56+ # https://github.com/aws-actions/configure-aws-credentials/releases
57+ uses : aws-actions/configure-aws-credentials@ec61189d14ec14c8efccab744f656cffd0e33f37 # v6.1.0
8958 with :
9059 role-to-assume : ${{env.AWS_ROLE}}
9160 role-session-name : ${{github.run_id}}
@@ -94,10 +63,14 @@ jobs:
9463 output-credentials : true
9564 - name : install-nix
9665 run : |
97- curl -L https://nixos.org/nix/install | sh
66+ curl -L -o install-nix.sh "https://releases.nixos.org/nix/nix-${NIX_INSTALL_VERSION}/install"
67+ echo "${NIX_INSTALL_SHA} install-nix.sh" | sha256sum -c -
68+ chmod +x install-nix.sh
69+ ./install-nix.sh
9870 source /home/runner/.nix-profile/etc/profile.d/nix.sh
9971 nix --version
10072 which nix
73+ rm -f install-nix.sh
10174 - name : run_tests
10275 shell : ' /home/runner/.nix-profile/bin/nix develop --ignore-environment --extra-experimental-features nix-command --extra-experimental-features flakes --keep HOME --keep SSH_AUTH_SOCK --keep IDENTIFIER --keep GITHUB_TOKEN --keep GITHUB_OWNER --keep ZONE --keep AWS_ROLE --keep AWS_REGION --keep AWS_DEFAULT_REGION --keep AWS_ACCESS_KEY_ID --keep AWS_SECRET_ACCESS_KEY --keep AWS_SESSION_TOKEN --keep UPDATECLI_GPGTOKEN --keep UPDATECLI_GITHUB_TOKEN --keep UPDATECLI_GITHUB_ACTOR --keep GPG_SIGNING_KEY --keep NIX_SSL_CERT_FILE --keep NIX_ENV_LOADED --keep TERM --command bash -e {0}'
10376 env :
@@ -123,12 +96,14 @@ jobs:
12396 if : always() && needs.release.outputs.release_pr
12497 runs-on : ubuntu-latest
12598 steps :
99+ # https://github.com/actions/checkout/releases
126100 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
127101 with :
128102 token : ${{secrets.GITHUB_TOKEN}}
129103 fetch-depth : 0
130104 - id : aws-creds
131- uses : aws-actions/configure-aws-credentials@ec61189d14ec14c8efccab744f656cffd0e33f37 # v6
105+ # https://github.com/aws-actions/configure-aws-credentials/releases
106+ uses : aws-actions/configure-aws-credentials@ec61189d14ec14c8efccab744f656cffd0e33f37 # v6.1.0
132107 with :
133108 role-to-assume : ${{env.AWS_ROLE}}
134109 role-session-name : ${{github.run_id}}-cleanup
@@ -137,10 +112,14 @@ jobs:
137112 output-credentials : true
138113 - name : install-nix
139114 run : |
140- curl -L https://nixos.org/nix/install | sh
115+ curl -L -o install-nix.sh "https://releases.nixos.org/nix/nix-${NIX_INSTALL_VERSION}/install"
116+ echo "${NIX_INSTALL_SHA} install-nix.sh" | sha256sum -c -
117+ chmod +x install-nix.sh
118+ ./install-nix.sh
141119 source /home/runner/.nix-profile/etc/profile.d/nix.sh
142120 nix --version
143121 which nix
122+ rm -f install-nix.sh
144123 - name : cleanup
145124 shell : ' /home/runner/.nix-profile/bin/nix develop --ignore-environment --extra-experimental-features nix-command --extra-experimental-features flakes --keep HOME --keep SSH_AUTH_SOCK --keep IDENTIFIER --keep GITHUB_TOKEN --keep GITHUB_OWNER --keep ZONE --keep AWS_ROLE --keep AWS_REGION --keep AWS_DEFAULT_REGION --keep AWS_ACCESS_KEY_ID --keep AWS_SECRET_ACCESS_KEY --keep AWS_SESSION_TOKEN --keep UPDATECLI_GPGTOKEN --keep UPDATECLI_GITHUB_TOKEN --keep UPDATECLI_GITHUB_ACTOR --keep GPG_SIGNING_KEY --keep NIX_SSL_CERT_FILE --keep NIX_ENV_LOADED --keep TERM --command bash -e {0}'
146125 env :
@@ -160,7 +139,8 @@ jobs:
160139 if : success() && needs.release.outputs.release_pr # Ensure the test jobs succeeded, and that a release PR was created.
161140 runs-on : ubuntu-latest
162141 steps :
163- - uses : actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
142+ # https://github.com/actions/github-script/releases
143+ - uses : actions/github-script@d746ffe35508b1917358783b479e04febd2b8f71 # v9.0.0
164144 with :
165145 github-token : ${{secrets.GITHUB_TOKEN}}
166146 script : |
0 commit comments