From 68e2cf8182ef9015be48445152eccfe78faefaa3 Mon Sep 17 00:00:00 2001 From: NichArchA82 <64152648+NichArchA82@users.noreply.github.com> Date: Fri, 4 Oct 2024 23:15:02 -0600 Subject: [PATCH] Feat/build hetzner in multi projects (#158) * feat: add another env variable for multiple projects * feat: add tokens for multi builder * chore: create packer build test action * fix: env token var * chore: Revert "feat: add tokens for multi builder" * fix: update hetzner packer github actions * fix: github action ids not unique * fix: Delete .github/workflows/packer-test.yml as it's been consolidated into the existing file --------- Co-authored-by: Venkat --- .github/workflows/packer-hetzner.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/packer-hetzner.yml b/.github/workflows/packer-hetzner.yml index 4adebe5..e49d7df 100644 --- a/.github/workflows/packer-hetzner.yml +++ b/.github/workflows/packer-hetzner.yml @@ -23,8 +23,14 @@ jobs: id: init run: packer init hetzner.pkr.hcl - - name: Run `packer build` - id: build + - name: Run `packer build stage` + id: build_stage run: packer build -var glueops_codespaces_container_tag=${{ github.event.workflow_run.head_branch }} hetzner.pkr.hcl env: - HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }} + HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN_STAGE }} + + - name: Run `packer build prod` + id: build_prod + run: packer build -var glueops_codespaces_container_tag=${{ github.event.workflow_run.head_branch }} hetzner.pkr.hcl + env: + HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN_PROD }} \ No newline at end of file