From 7514933fee257bacfae284a5d4297d603002a076 Mon Sep 17 00:00:00 2001 From: Ivan Pavlovic Date: Thu, 21 Jul 2022 17:21:00 +0200 Subject: [PATCH] revert build workflow --- .github/workflows/build.yaml | 84 ++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index fa3ff8e..7a49a1a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,49 +1,49 @@ -# name: Packer Build +name: Packer Build -# on: -# push: -# branches: -# - main +on: + push: + branches: + - main -# jobs: -# build-gcp: -# runs-on: ubuntu-20.04 -# environment: gcp -# steps: -# - name: Checkout Packer project -# uses: actions/checkout@v3 +jobs: + build-gcp: + runs-on: ubuntu-20.04 + environment: gcp + steps: + - name: Checkout Packer project + uses: actions/checkout@v3 -# - name: Initialize Packer Plugin Binaries:GCP -# run: packer init ./gcp + - name: Initialize Packer Plugin Binaries:GCP + run: packer init ./gcp -# - name: Build Image:GCP -# env: -# PKR_VAR_project: ${{ secrets.GOOGLE_PROJECT }} -# GOOGLE_APPLICATION_CREDENTIALS: gcp.json -# run: | -# cat > $GOOGLE_APPLICATION_CREDENTIALS << EOF -# ${{ secrets.GOOGLE_CREDENTIALS }} -# EOF -# trap "rm -f $GOOGLE_APPLICATION_CREDENTIALS" EXIT -# packer build -force -var-file=./gcp/amd64/values.pkrvars.hcl -var "runner_version=$(cat versions.json | jq -r '.runner')" ./gcp + - name: Build Image:GCP + env: + PKR_VAR_project: ${{ secrets.GOOGLE_PROJECT }} + GOOGLE_APPLICATION_CREDENTIALS: gcp.json + run: | + cat > $GOOGLE_APPLICATION_CREDENTIALS << EOF + ${{ secrets.GOOGLE_CREDENTIALS }} + EOF + trap "rm -f $GOOGLE_APPLICATION_CREDENTIALS" EXIT + packer build -force -var-file=./gcp/amd64/values.pkrvars.hcl -var "runner_version=$(cat versions.json | jq -r '.runner')" ./gcp -# build-aws: -# runs-on: ubuntu-20.04 -# environment: aws -# strategy: -# matrix: -# aws-region: [us-east-1, us-west-2] -# steps: -# - name: Checkout Packer project -# uses: actions/checkout@v3 + build-aws: + runs-on: ubuntu-20.04 + environment: aws + strategy: + matrix: + aws-region: [us-east-1, us-west-2] + steps: + - name: Checkout Packer project + uses: actions/checkout@v3 -# - name: Initialize Packer Plugin Binaries:AWS -# run: packer init ./aws + - name: Initialize Packer Plugin Binaries:AWS + run: packer init ./aws -# - name: Build Image:AWS -# env: -# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} -# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} -# run: | -# packer build -force -var-file=./aws/amd64/values.pkrvars.hcl -var "region=${{ matrix.aws-region }}" -var "runner_version=$(cat versions.json | jq -r '.runner')" ./aws -# packer build -force -var-file=./aws/arm64/values.pkrvars.hcl -var "region=${{ matrix.aws-region }}" -var "runner_version=$(cat versions.json | jq -r '.runner')" ./aws \ No newline at end of file + - name: Build Image:AWS + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + run: | + packer build -force -var-file=./aws/amd64/values.pkrvars.hcl -var "region=${{ matrix.aws-region }}" -var "runner_version=$(cat versions.json | jq -r '.runner')" ./aws + packer build -force -var-file=./aws/arm64/values.pkrvars.hcl -var "region=${{ matrix.aws-region }}" -var "runner_version=$(cat versions.json | jq -r '.runner')" ./aws \ No newline at end of file