mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-26 10:34:24 +01:00
Setup the snapcraft environment manually as the action we had been using for this does not appear to be actively maintained currently. Related to this, switch to specifying the snapcraft store credentials using the `SNAPCRAFT_STORE_CREDENTIALS` secret. This unbreaks `snapcraft upload`, which Canonical appear to have broken by removing the previous facility. Fixes: #5772. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
38 lines
1.0 KiB
YAML
38 lines
1.0 KiB
YAML
name: snap CI
|
|
on:
|
|
pull_request:
|
|
types:
|
|
- opened
|
|
- synchronize
|
|
- reopened
|
|
- edited
|
|
paths-ignore: [ '**.md', '**.png', '**.jpg', '**.jpeg', '**.svg', '/docs/**' ]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Check out
|
|
if: ${{ !contains(github.event.pull_request.labels.*.name, 'force-skip-ci') }}
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install Snapcraft
|
|
if: ${{ !contains(github.event.pull_request.labels.*.name, 'force-skip-ci') }}
|
|
run: |
|
|
# Required to avoid snapcraft install failure
|
|
sudo chown root:root /
|
|
|
|
# "--classic" is needed for the GitHub action runner
|
|
# environment.
|
|
sudo snap install snapcraft --classic
|
|
|
|
# Allow other parts to access snap binaries
|
|
echo /snap/bin >> "$GITHUB_PATH"
|
|
|
|
- name: Build snap
|
|
if: ${{ !contains(github.event.pull_request.labels.*.name, 'force-skip-ci') }}
|
|
run: |
|
|
snapcraft snap --debug --destructive-mode
|