Skip to content

Commit

Permalink
gh action to publish the provider snap
Browse files Browse the repository at this point in the history
  • Loading branch information
hector-cao committed Oct 4, 2024
1 parent 82cd552 commit 52532a8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
21 changes: 21 additions & 0 deletions .github/workflows/create-snap-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@ on:

jobs:

check-secret:
runs-on: ubuntu-22.04
outputs:
snap-key: ${{ steps.snap-key.outputs.defined }}
steps:
- id: snap-key
name: Set defined=true if SNAPCRAFT7_CREDS is defined
if: "${{ env.SNAPSTORE_KEY != '' }}"
run: echo "defined=true" >> $GITHUB_OUTPUT
env:
SNAPSTORE_KEY: ${{ secrets.SNAPCRAFT7_CREDS }}

build:
runs-on: ubuntu-22.04
steps:
Expand All @@ -34,3 +46,12 @@ jobs:
run: |
sudo snap install checkbox22
sudo snap install --dangerous --classic ${{ steps.build.outputs.snap }}
- if: needs.check-secret.outputs.snap-key == 'true' && (github.ref_name == 'noble-24.04')
name: Publish snap to edge channel
uses: snapcore/[email protected]
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT7_CREDS }}
with:
snap: ${{ steps.build.outputs.snap }}
release: edge
2 changes: 1 addition & 1 deletion tests/snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: checkbox-tdx-classic
summary: Checkbox tests for TDX
description: |
Collection of tests for Intel TDX (Trusted Domain eXtension)
version: '2.0'
version: '1.0.0'
confinement: classic
grade: stable

Expand Down

0 comments on commit 52532a8

Please sign in to comment.