fix: Output download to file
Some checks failed
tofu plan k8s-wheatley / tofu-plan-k8s-wheatley (pull_request) Failing after 6s
Some checks failed
tofu plan k8s-wheatley / tofu-plan-k8s-wheatley (pull_request) Failing after 6s
This commit is contained in:
parent
4bcf2a32e5
commit
735b51637c
1 changed files with 4 additions and 3 deletions
|
|
@ -12,6 +12,7 @@ on:
|
|||
env:
|
||||
TOFU_VERSION: 1.10.7
|
||||
TOFU_CHECKSUM: 765a7374aeafcad15fe8da5359de76ce11ba0fd3cb6c2dc85d3b390e6362cae5
|
||||
TOFU_ARCHIVE: tofu_${{ env.TOFU_VERSION }}_linux_amd64.tar.gz
|
||||
TOFU_DIR: pve01.wheatley.in/k8s-wheatley
|
||||
AWS_S3_ENDPOINT: ${{ secrets.AWS_S3_ENDPOINT }}
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
|
|
@ -30,10 +31,10 @@ jobs:
|
|||
run: |
|
||||
set -eo pipefail
|
||||
echo "Downloading OpenTofu..."
|
||||
curl -L https://github.com/opentofu/opentofu/releases/download/v${{ env.TOFU_VERSION }}/tofu_${{ env.TOFU_VERSION }}_linux_amd64.tar.gz
|
||||
curl -L https://github.com/opentofu/opentofu/releases/download/v${{ env.TOFU_VERSION }}/${{ env.TOFU_ARCHIVE }} -o ${{ env.TOFU_ARCHIVE }}
|
||||
echo "Downloaded OpenTofu ✅"
|
||||
echo "Verifying checksum..."
|
||||
if echo "${{ env.TOFU_CHECKSUM }} tofu_${{ env.TOFU_VERSION }}_linux_amd64.tar.gz" | sha256sum --check --status; then
|
||||
if echo "${{ env.TOFU_CHECKSUM }} ${{ env.TOFU_ARCHIVE }}" | sha256sum --check --status; then
|
||||
echo "Checksum OK ✅"
|
||||
else
|
||||
echo "Checksum mismatch! ❌"
|
||||
|
|
@ -44,7 +45,7 @@ jobs:
|
|||
- name: Install OpenTofu
|
||||
run: |
|
||||
echo "Untarring..."
|
||||
tar -xzf tofu_${{ env.TOFU_VERSION }}_linux_amd64.tar.gz
|
||||
tar -xzf ${{ env.TOFU_ARCHIVE }}
|
||||
echo "Untarring ✅"
|
||||
echo "Installing OpenTofu Binary..."
|
||||
mv tofu /usr/local/bin/tofu
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue