ci: Change workflows to publish the snap to Store for Nvidia testing #3
Workflow file for this run
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: Build | |
on: | |
pull_request: | |
push: | |
defaults: | |
run: | |
shell: 'bash -Eeuo pipefail -x {0}' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Build | |
uses: snapcore/action-build@v1 | |
id: snapcraft | |
with: | |
snapcraft-args: snap --output docker_${{ github.run_id}}.snap | |
- name: Upload | |
# TODO: the goal of this "if:" condition is to avoid creating artifacts on private forks (and using up all their storage quota), | |
# but Tianon couldn't find a clean way to do that so this was the next best thing | |
if: github.repository == 'canonical/docker-snap' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: docker_${{ github.run_id}}.snap | |
path: ${{ steps.snapcraft.outputs.snap }} | |