Skip to content

Commit

Permalink
Remove the build on release once this is done on check (#98)
Browse files Browse the repository at this point in the history
* Remove the build on release once this is done on check

- building two times in the same run result into conflicts in
  Github action.

* fix variable
  • Loading branch information
gabrielcocenza authored Oct 1, 2024
1 parent f80ab70 commit 09f0c6b
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions terraform-plans/templates/github/snap_release.yaml.tftpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,25 @@ jobs:
fail-fast: false
matrix:
runs-on: ${runs_on}
outputs:
snap: $${{ steps.build.outputs.snap }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Complete git history is required to generate the version from git tags.
- uses: canonical/action-build@v1
id: build

- name: Determine system architecture
run: echo "SYSTEM_ARCH=$(uname -m)" >> $GITHUB_ENV
- uses: actions/upload-artifact@v4

- name: Download the built snap from check workflow
uses: actions/download-artifact@v4
with:
name: snap_$${{ env.SYSTEM_ARCH }}
path: $${{ steps.build.outputs.snap }}

- name: Find the downloaded snap file
run: echo "SNAP_FILE=$(find . -name "*.snap")" >> $GITHUB_ENV

- uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: $${{ secrets.STORE_LOGIN }}
with:
snap: $${{ steps.build.outputs.snap }}
snap: $${{ env.SNAP_FILE }}
release: latest/edge

0 comments on commit 09f0c6b

Please sign in to comment.