Skip to content

Commit

Permalink
revert build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
pavlovic-ivan committed Jul 21, 2022
1 parent 149478e commit 7514933
Showing 1 changed file with 42 additions and 42 deletions.
84 changes: 42 additions & 42 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -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
- 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

0 comments on commit 7514933

Please sign in to comment.