build(deps): bump golang.org/x/sys from 0.28.0 to 0.29.0 #433
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: Tests | |
on: | |
push: | |
pull_request: | |
permissions: | |
contents: read | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
# Make sure bash is always invoked with `-eo pipefail` | |
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell | |
shell: bash | |
jobs: | |
code-tests: | |
name: Code tests | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-20.04 | |
- ubuntu-22.04 | |
- ubuntu-24.04 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Dependency Review | |
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0 | |
if: github.event_name == 'pull_request' | |
- name: Install Go | |
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 | |
with: | |
go-version-file: go.mod | |
- name: Install dependencies | |
run: | | |
sudo apt-get -qq update | |
sudo apt-get install -y --no-install-recommends squashfs-tools xdelta3 | |
- name: Update Go modules | |
run: make update-gomod | |
- name: Run static analysis | |
run: make static-analysis | |
- name: Unit tests (all) | |
run: make check | |
snap: | |
name: Trigger snap edge build | |
runs-on: ubuntu-24.04 | |
needs: [code-tests] | |
if: ${{ github.repository == 'canonical/lxd-imagebuilder' && github.event_name == 'push' && github.actor != 'dependabot[bot]' }} | |
env: | |
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | |
PACKAGE: "lxd-imagebuilder" | |
REPO: "git+ssh://[email protected]/~canonical-lxd/lxd-imagebuilder" | |
BRANCH: >- | |
${{ fromJson('{ | |
"main": "latest-edge", | |
}')[github.ref_name] }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: canonical/lxd/.github/actions/lp-snap-build@main | |
with: | |
ssh-key: "${{ secrets.LAUNCHPAD_LXD_BOT_KEY}}" | |
- name: Trigger Launchpad snap build | |
run: | | |
set -eux | |
echo "${PATH}" | |
localRev="$(git rev-parse HEAD)" | |
cd ~/"${PACKAGE}-pkg-snap-lp" | |
lxd-snapcraft -package "${PACKAGE}" -set-version "git-${localRev:0:7}" -set-source-commit "${localRev}" | |
git add --all | |
git commit --all --quiet -s --allow-empty -m "Automatic upstream build (${BRANCH})" -m "Upstream commit: ${localRev}" | |
git show | |
git push --quiet |