commit ff1150176ec268c1a290bf3a28140948ff636dd5 Author: Pal Kerecsenyi Date: Mon Apr 1 22:16:28 2024 +0100 Initial commit diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..af920c7 --- /dev/null +++ b/action.yml @@ -0,0 +1,20 @@ +name: "Install Terraform" +description: "Install Terraform in an Alpine Linux environment" +runs: + using: composite + steps: + - run: | + apk add --update --virtual .deps --no-cache gnupg && \ + cd /tmp && \ + wget https://releases.hashicorp.com/${PRODUCT}/${VERSION}/${PRODUCT}_${VERSION}_linux_amd64.zip && \ + wget https://releases.hashicorp.com/${PRODUCT}/${VERSION}/${PRODUCT}_${VERSION}_SHA256SUMS && \ + wget https://releases.hashicorp.com/${PRODUCT}/${VERSION}/${PRODUCT}_${VERSION}_SHA256SUMS.sig && \ + wget -qO- https://www.hashicorp.com/.well-known/pgp-key.txt | gpg --import && \ + gpg --verify ${PRODUCT}_${VERSION}_SHA256SUMS.sig ${PRODUCT}_${VERSION}_SHA256SUMS && \ + grep ${PRODUCT}_${VERSION}_linux_amd64.zip ${PRODUCT}_${VERSION}_SHA256SUMS | sha256sum -c && \ + unzip /tmp/${PRODUCT}_${VERSION}_linux_amd64.zip -d /tmp && \ + mv /tmp/${PRODUCT} /usr/local/bin/${PRODUCT} && \ + rm -f /tmp/${PRODUCT}_${VERSION}_linux_amd64.zip ${PRODUCT}_${VERSION}_SHA256SUMS ${VERSION}/${PRODUCT}_${VERSION}_SHA256SUMS.sig && \ + apk del .deps + shell: sh + name: Install Terraform