-
Notifications
You must be signed in to change notification settings - Fork 629
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3739 from apostasie/ci-cleanup
Small Ci adjustments & cleanups
- Loading branch information
Showing
7 changed files
with
41 additions
and
48 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,19 +31,19 @@ jobs: | |
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/[email protected] | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1 | ||
|
||
# Login against a Docker registry except on PR | ||
# https://github.com/docker/login-action | ||
- name: Log into registry ${{ env.REGISTRY }} | ||
if: github.event_name != 'pull_request' | ||
uses: docker/[email protected] | ||
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
|
@@ -53,14 +53,14 @@ jobs: | |
# https://github.com/docker/metadata-action | ||
- name: Extract Docker metadata | ||
id: meta | ||
uses: docker/[email protected] | ||
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5.6.1 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
|
||
# Build and push Docker image with Buildx (don't push on PR) | ||
# https://github.com/docker/build-push-action | ||
- name: Build and push Docker image | ||
uses: docker/[email protected] | ||
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ jobs: | |
env: | ||
GOOS: "${{ matrix.goos }}" | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
fetch-depth: 1 | ||
- name: Set GO env | ||
|
@@ -46,28 +46,26 @@ jobs: | |
. ./hack/build-integration-canary.sh | ||
canary::golang::latest | ||
fi | ||
- uses: actions/setup-go@v5 | ||
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
check-latest: true | ||
cache: true | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v6 | ||
uses: golangci/golangci-lint-action@774c35bcccffb734694af9e921f12f57d882ef74 # v6.1.1 | ||
with: | ||
args: --verbose | ||
other: | ||
timeout-minutes: 5 | ||
name: yaml | shell | imports order | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
fetch-depth: 1 | ||
- uses: actions/setup-go@v5 | ||
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
check-latest: true | ||
cache: true | ||
- name: yaml | ||
run: make lint-yaml | ||
- name: shell | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,15 +13,15 @@ jobs: | |
runs-on: ubuntu-24.04 | ||
timeout-minutes: 20 | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
path: src/github.com/containerd/nerdctl | ||
fetch-depth: 100 | ||
- uses: actions/setup-go@v5 | ||
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
cache-dependency-path: src/github.com/containerd/nerdctl | ||
- uses: containerd/[email protected] | ||
- uses: containerd/project-checks@434a07157608eeaa1d5c8d4dd506154204cd9401 # v1.1.0 | ||
with: | ||
working-directory: src/github.com/containerd/nerdctl | ||
repo-access-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,8 +10,8 @@ jobs: | |
runs-on: ubuntu-24.04 | ||
timeout-minutes: 40 | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/setup-go@v5 | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 | ||
with: | ||
go-version: 1.23.x | ||
- name: "Compile binaries" | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ jobs: | |
runs-on: "ubuntu-24.04" | ||
timeout-minutes: 40 | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
fetch-depth: 1 | ||
- name: "Prepare integration test environment" | ||
|
@@ -55,7 +55,7 @@ jobs: | |
run: | ||
shell: bash | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
fetch-depth: 1 | ||
- name: Set GO env | ||
|
@@ -70,16 +70,15 @@ jobs: | |
. ./hack/build-integration-canary.sh | ||
canary::golang::latest | ||
- uses: actions/setup-go@v5 | ||
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
cache: true | ||
check-latest: true | ||
- run: go install ./cmd/nerdctl | ||
- run: go install -v gotest.tools/gotestsum@v1 | ||
# This here is solely to get the cni install script, which has not been modified in 3+ years. | ||
# There is little to no reason to update this to latest containerd | ||
- uses: actions/[email protected] | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
repository: containerd/containerd | ||
ref: "v1.7.24" | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ jobs: | |
env: | ||
ROOTFUL: true | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
fetch-depth: 1 | ||
- name: "Run Kubernetes integration tests" | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,11 +40,11 @@ jobs: | |
CONTAINERD_VERSION: "${{ matrix.containerd }}" | ||
ARCH: "${{ matrix.arch }}" | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
fetch-depth: 1 | ||
- name: "Expose GitHub Runtime variables for gha" | ||
uses: crazy-max/ghaction-github-runtime@v3 | ||
uses: crazy-max/ghaction-github-runtime@b3a9207c0e1ef41f4cf215303c976869d0c2c1c4 # v3.0.0 | ||
- name: "Build dependencies for the integration test environment image" | ||
run: | | ||
docker buildx create --name with-gha --use | ||
|
@@ -73,16 +73,15 @@ jobs: | |
- os: ubuntu-24.04 | ||
goos: linux | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
fetch-depth: 1 | ||
- uses: actions/setup-go@v5 | ||
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
check-latest: true | ||
cache: true | ||
- if: ${{ matrix.goos=='windows' }} | ||
uses: actions/[email protected] | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
repository: containerd/containerd | ||
ref: v1.7.24 | ||
|
@@ -126,11 +125,11 @@ jobs: | |
ARCH: "${{ matrix.arch }}" | ||
UBUNTU_VERSION: "${{ matrix.ubuntu }}" | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
fetch-depth: 1 | ||
- name: "Expose GitHub Runtime variables for gha" | ||
uses: crazy-max/ghaction-github-runtime@v3 | ||
uses: crazy-max/ghaction-github-runtime@b3a9207c0e1ef41f4cf215303c976869d0c2c1c4 # v3.0.0 | ||
- name: "Prepare integration test environment" | ||
run: | | ||
docker buildx create --name with-gha --use | ||
|
@@ -175,15 +174,15 @@ jobs: | |
ARCH: "${{ matrix.arch }}" | ||
UBUNTU_VERSION: "${{ matrix.ubuntu }}" | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
fetch-depth: 1 | ||
- name: Enable ipv4 and ipv6 forwarding | ||
run: | | ||
sudo sysctl -w net.ipv6.conf.all.forwarding=1 | ||
sudo sysctl -w net.ipv4.ip_forward=1 | ||
- name: "Expose GitHub Runtime variables for gha" | ||
uses: crazy-max/ghaction-github-runtime@v3 | ||
uses: crazy-max/ghaction-github-runtime@b3a9207c0e1ef41f4cf215303c976869d0c2c1c4 # v3.0.0 | ||
- name: Enable IPv6 for Docker, and configure docker to use containerd for gha | ||
run: | | ||
sudo mkdir -p /etc/docker | ||
|
@@ -271,7 +270,7 @@ jobs: | |
} | ||
EOT | ||
sudo systemctl restart apparmor.service | ||
- uses: actions/[email protected] | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
fetch-depth: 1 | ||
- name: "Register QEMU (tonistiigi/binfmt)" | ||
|
@@ -284,7 +283,7 @@ jobs: | |
docker run --privileged --rm tonistiigi/binfmt --install linux/arm64 | ||
docker run --privileged --rm tonistiigi/binfmt --install linux/arm/v7 | ||
- name: "Expose GitHub Runtime variables for gha" | ||
uses: crazy-max/ghaction-github-runtime@v3 | ||
uses: crazy-max/ghaction-github-runtime@b3a9207c0e1ef41f4cf215303c976869d0c2c1c4 # v3.0.0 | ||
- name: "Prepare (network driver=slirp4netns, port driver=builtin)" | ||
run: | | ||
docker buildx create --name with-gha --use | ||
|
@@ -313,13 +312,12 @@ jobs: | |
matrix: | ||
go-version: ["1.22.x", "1.23.x"] | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
fetch-depth: 1 | ||
- uses: actions/setup-go@v5 | ||
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
cache: true | ||
check-latest: true | ||
- name: "build" | ||
run: GO_VERSION="$(echo ${{ matrix.go-version }} | sed -e s/.x//)" make binaries | ||
|
@@ -329,13 +327,12 @@ jobs: | |
name: docker | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
fetch-depth: 1 | ||
- uses: actions/setup-go@v5 | ||
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
cache: true | ||
check-latest: true | ||
- name: "Register QEMU (tonistiigi/binfmt)" | ||
run: | | ||
|
@@ -365,17 +362,16 @@ jobs: | |
run: | ||
shell: bash | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
fetch-depth: 1 | ||
- uses: actions/setup-go@v5 | ||
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
cache: true | ||
check-latest: true | ||
- run: go install ./cmd/nerdctl | ||
- run: go install -v gotest.tools/gotestsum@v1 | ||
- uses: actions/[email protected] | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
repository: containerd/containerd | ||
ref: v1.7.24 | ||
|
@@ -399,10 +395,10 @@ jobs: | |
# ubuntu-24.04 lacks the vagrant package | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
fetch-depth: 1 | ||
- uses: actions/cache@v4 | ||
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 | ||
with: | ||
path: /root/.vagrant.d | ||
key: vagrant-${{ matrix.box }} | ||
|