[tests] Scrub tests #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: snap | |
on: | |
push: | |
branches: | |
- main | |
release: | |
types: | |
- published | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
concurrency: | |
group: snap-build | |
cancel-in-progress: true | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: snapcore/action-build@v1 | |
id: build-snap | |
# Make sure the snap is installable | |
- run: | | |
sudo apt -y remove sosreport | |
sudo snap install --classic --dangerous ${{ steps.build-snap.outputs.snap }} | |
sudo snap alias sosreport.sos sos | |
# Do some testing with the snap | |
- run: | | |
sudo sos help | |
- uses: snapcore/action-publish@v1 | |
if: ${{ github.event_name == 'push' }} | |
env: | |
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }} | |
with: | |
snap: ${{ steps.build-snap.outputs.snap }} | |
release: "latest/edge" | |
- uses: snapcore/action-publish@v1 | |
if: ${{ github.event_name == 'release' }} | |
env: | |
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }} | |
with: | |
snap: ${{ steps.build-snap.outputs.snap }} | |
release: "latest/candidate" |