From 48ad98fecf9600627aa2357adbf2f4d261089cc2 Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Thu, 12 Oct 2023 16:42:53 -0400 Subject: [PATCH 1/3] github: test build lxd-migrate prior to pushing to LP Signed-off-by: Simon Deziel --- .github/workflows/builds.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index ae2292bd3..b245d9042 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -1,5 +1,6 @@ name: Builds on: + pull_request: push: branches: - latest-edge @@ -8,9 +9,28 @@ permissions: contents: read jobs: + lxd-migrate: + name: Test lxd-migrate build + runs-on: ubuntu-22.04 + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install Go + uses: actions/setup-go@v4 + with: + go-version: 1.18.x + + - name: Test lxd-migrate build + run: | + set -eux + cd ~/work/lxd-pkg-snap/lxd-pkg-snap/lxd-migrate + CGO_ENABLED=0 go build -v -tags netgo + snap: name: Trigger snap build runs-on: ubuntu-22.04 + needs: lxd-migrate if: ${{ github.repository == 'canonical/lxd-pkg-snap' && github.event_name == 'push' && github.actor != 'dependabot[bot]' }} steps: - name: Checkout code From 6dcb3d89e951028ba3b2e4abef0eae727b382f7d Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Thu, 19 Oct 2023 22:40:58 -0400 Subject: [PATCH 2/3] github: avoid concurrent action runs Signed-off-by: Simon Deziel --- .github/workflows/builds.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index b245d9042..7bdcf8536 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -8,6 +8,10 @@ on: permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: lxd-migrate: name: Test lxd-migrate build From 74fb8e2d258ec5044b0f526510babea193fa8085 Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Thu, 16 Nov 2023 06:59:55 -0500 Subject: [PATCH 3/3] github: use Go 1.20 in builds workflow Signed-off-by: Simon Deziel --- .github/workflows/builds.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index 7bdcf8536..f26157939 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -23,7 +23,7 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: 1.18.x + go-version: 1.20.x - name: Test lxd-migrate build run: | @@ -58,7 +58,7 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: 1.18.x + go-version: 1.20.x - name: Trigger Launchpad snap build env: