Skip to content

Commit

Permalink
update gh actions versions, update engine matrix, bump golang to 1.21.11
Browse files Browse the repository at this point in the history
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
  • Loading branch information
glours authored and ndeloof committed Jun 12, 2024
1 parent 084a5ca commit 1a14fcb
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 35 deletions.
68 changes: 39 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Create matrix
id: platforms
Expand All @@ -53,7 +53,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
Expand All @@ -78,7 +78,7 @@ jobs:
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand All @@ -96,18 +96,18 @@ jobs:
*.cache-to=type=gha,scope=binary-${{ env.PLATFORM_PAIR }},mode=max
-
name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: compose
path: ./bin/release/*
name: compose-${{ env.PLATFORM_PAIR }}
path: ./bin/release
if-no-files-found: error

test:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
Expand All @@ -121,7 +121,7 @@ jobs:
*.cache-to=type=gha,scope=test
-
name: Gather coverage data
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-data-unit
path: bin/coverage/unit/
Expand All @@ -142,14 +142,21 @@ jobs:
- standalone
engine:
- 24.0.9
- 25.0.4
- 26.0.0
- 25.0.5
- 26.1.4
steps:
- name: Prepare
run: |
mode=${{ matrix.mode }}
engine=${{ matrix.engine }}
echo "MODE_ENGINE_PAIR=${mode}-${engine}" >> $GITHUB_ENV
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Docker ${{ matrix.engine }}
run: |
sudo systemctl stop docker.service
sudo apt-get purge docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin
sudo apt-get install curl
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh ./get-docker.sh --version ${{ matrix.engine }}
Expand All @@ -160,7 +167,7 @@ jobs:
uses: docker/setup-buildx-action@v2
-
name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
check-latest: true
Expand Down Expand Up @@ -193,9 +200,9 @@ jobs:
-
name: Gather coverage data
if: ${{ matrix.mode == 'plugin' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-data-e2e
name: coverage-data-e2e-${{ env.MODE_ENGINE_PAIR }}
path: bin/coverage/e2e/
if-no-files-found: error
-
Expand All @@ -212,34 +219,36 @@ jobs:
paths: /tmp/report/report.xml
if: always()
coverage:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
needs:
- test
- e2e
steps:
# codecov won't process the report without the source code available
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
check-latest: true
- name: Download unit test coverage
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: coverage-data-unit
path: coverage/unit
merge-multiple: true
- name: Download E2E test coverage
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: coverage-data-e2e
pattern: coverage-data-e2e-*
path: coverage/e2e
merge-multiple: true
- name: Merge coverage reports
run: |
go tool covdata textfmt -i=./coverage/unit,./coverage/e2e -o ./coverage.txt
- name: Store coverage report in GitHub Actions
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: go-covdata-txt
path: ./coverage.txt
Expand All @@ -259,28 +268,29 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: compose
path: bin/release
pattern: compose-*
path: ./bin/release
merge-multiple: true
-
name: Create checksums
working-directory: bin/release
working-directory: ./bin/release
run: |
find . -type f -print0 | sort -z | xargs -r0 shasum -a 256 -b | sed 's# \*\./# *#' > $RUNNER_TEMP/checksums.txt
shasum -a 256 -U -c $RUNNER_TEMP/checksums.txt
mv $RUNNER_TEMP/checksums.txt .
cat checksums.txt | while read sum file; do echo "$sum $file" > ${file#\*}.sha256; done
-
name: License
run: cp packaging/* bin/release/
run: cp packaging/* ./bin/release/
-
name: List artifacts
run: |
tree -nh bin/release
tree -nh ./bin/release
-
name: Check artifacts
run: |
Expand All @@ -290,7 +300,7 @@ jobs:
if: startsWith(github.ref, 'refs/tags/v')
uses: ncipollo/release-action@58ae73b360456532aafd58ee170c045abbeaee37 # v1.10.0
with:
artifacts: bin/release/*
artifacts: ./bin/release/*
generateReleaseNotes: true
draft: true
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
uses: actions/checkout@v4
-
name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:

jobs:
docs-yaml:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
-
name: Checkout
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ jobs:
env:
GO111MODULE: "on"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG GO_VERSION=1.21.10
ARG GO_VERSION=1.21.11
ARG XX_VERSION=1.2.1
ARG GOLANGCI_LINT_VERSION=v1.55.2
ARG ADDLICENSE_VERSION=v1.0.0
Expand Down

0 comments on commit 1a14fcb

Please sign in to comment.