Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: update gha to account for node 16 deprecation #4605

Merged
merged 6 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ updates:
directory: "/"
schedule:
interval: "daily"
ignore:
# ignore this dependency
# it seems a bug with dependabot as pining to commit sha should not
# trigger a new version: https://github.com/docker/buildx/pull/2222#issuecomment-1919092153
- dependency-name: "docker/docs"
labels:
- "dependencies"
- "bot"
29 changes: 16 additions & 13 deletions .github/workflows/.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
-
name: Set outputs
id: set
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const yaml = require('js-yaml');
Expand Down Expand Up @@ -123,11 +123,20 @@ jobs:
include: ${{ fromJson(needs.prepare.outputs.includes) }}
steps:
-
name: Environment variables
name: Prepare
run: |
for l in "${{ inputs.env }}"; do
echo "${l?}" >> $GITHUB_ENV
done
echo "TEST_REPORT_NAME=${{ github.job }}-$(echo "${{ matrix.pkg }}-${{ matrix.skip-integration-tests }}-${{ matrix.kind }}-${{ matrix.worker }}-${{ matrix.tags }}" | tr -dc '[:alnum:]-\n\r' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
testFlags="${{ env.TESTFLAGS }}"
if [ -n "${{ matrix.tags }}" ]; then
testFlags="${testFlags} --tags=${{ matrix.tags }}"
fi
if [ -n "${{ matrix.worker }}" ]; then
testFlags="${testFlags} --run=//worker=${{ matrix.worker }}$"
fi
echo "TESTFLAGS=${testFlags}" >> $GITHUB_ENV
-
name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -157,38 +166,32 @@ jobs:
-
name: Test
run: |
export TEST_REPORT_SUFFIX=-${{ github.job }}-$(echo "${{ matrix.pkg }}-${{ matrix.skip-integration-tests }}-${{ matrix.kind }}-${{ matrix.worker }}-${{ matrix.tags }}" | tr -dc '[:alnum:]-\n\r' | tr '[:upper:]' '[:lower:]')
if [ -n "${{ matrix.tags }}" ]; then
TESTFLAGS="${TESTFLAGS} --tags=${{ matrix.tags }}"
fi
if [ -n "${{ matrix.worker }}" ]; then
export TESTFLAGS="${TESTFLAGS} --run=//worker=${{ matrix.worker }}$"
fi
./hack/test ${{ matrix.kind }}
env:
TEST_REPORT_SUFFIX: -${{ env.TEST_REPORT_NAME }}
TEST_COVERAGE: 1
TESTPKGS: ${{ matrix.pkg }}
SKIP_INTEGRATION_TESTS: ${{ matrix.skip-integration-tests }}
CACHE_FROM: type=gha,scope=${{ inputs.cache_scope }}
-
name: Send to Codecov
if: always()
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
directory: ./bin/testreports
flags: ${{ matrix.codecov_flags }}
-
name: Generate annotations
if: always()
uses: crazy-max/.github/.github/actions/gotest-annotations@5af0882e0496d2f7e98a53ae4048e3d86682496f
uses: crazy-max/.github/.github/actions/gotest-annotations@fa6141aedf23596fb8bdcceab9cce8dadaa31bd9
with:
directory: ./bin/testreports
-
name: Upload test reports
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: test-reports
name: test-reports-${{ env.TEST_REPORT_NAME }}
path: ./bin/testreports
-
name: Dump context
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/buildkit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ jobs:
CACHE_TO: type=gha,scope=binaries-${{ env.PLATFORM_PAIR }}
-
name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: buildkit
name: buildkit-${{ env.PLATFORM_PAIR }}
path: ${{ env.DESTDIR }}/*
if-no-files-found: error

Expand Down Expand Up @@ -195,10 +195,11 @@ jobs:
steps:
-
name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: buildkit
path: ${{ env.DESTDIR }}
pattern: buildkit-*
merge-multiple: true
-
name: List artifacts
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/dockerd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
version:
description: 'Docker version'
required: true
default: '23.0.1'
default: '25.0.2'

env:
SETUP_BUILDX_VERSION: "latest"
Expand All @@ -20,10 +20,10 @@ jobs:
steps:
-
name: Prepare
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const version = `${{ inputs.version }}` || '23.0.1';
const version = `${{ inputs.version }}` || '25.0.2';
let build = 'true';
try {
new URL(version);
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
wget -qO- "https://download.docker.com/linux/static/stable/x86_64/docker-${{ env.DOCKER_VERSION }}.tgz" | tar xvz --strip 1
-
name: Upload dockerd
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dockerd
path: /tmp/moby/dockerd
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
buildkitd-flags: --debug
-
name: Download dockerd
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: dockerd
path: ./build/
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/docs-upstream.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# this workflow runs the remote validate bake target from docker/docker.github.io
# to check if yaml reference docs and markdown files used in this repo are still
# valid: https://github.com/docker/docs/blob/98c7c9535063ae4cd2cd0a31478a21d16d2f07a3/docker-bake.hcl#L34-L36
# path filters reflects the files that are used as remote resource in this
# repo: https://github.com/docker/docs/blob/d5312d53e255a24e421dfe6c3344359e10271cb8/_config.yml#L202-L217
# this workflow runs the remote validate bake target from docker/docs to check
# if yaml reference docs and markdown files used in this repo are still valid
# https://github.com/docker/docker.github.io/blob/98c7c9535063ae4cd2cd0a31478a21d16d2f07a3/docker-bake.hcl#L34-L36
name: docs-upstream

concurrency:
Expand Down Expand Up @@ -30,6 +28,6 @@ on:

jobs:
validate:
uses: docker/docs/.github/workflows/validate-upstream.yml@main
uses: docker/docs/.github/workflows/validate-upstream.yml@919a9b9104a34a40b30d116529bcce589a544d1c # pin for artifact v4 support: https://github.com/docker/docs/pull/19220
with:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this because other branches / dependencies are not yet updated? (sorry perhaps silly question; trying to understand why main wouldn't work if both docs and this repository now support v4)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to avoid having the workflow failing similar to docker/buildx#2210 (comment) in case artifact actions are bumped to v5 in the future on docs main and would/could therefore be incompatible with current v4.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, it's to pin to the current version (prevent updates); I was reading and thought it was downgrading the version 🤗

module-name: moby/buildkit
12 changes: 6 additions & 6 deletions .github/workflows/test-os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,23 +93,23 @@ jobs:
-
name: Send to Codecov
if: always()
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
directory: ./bin/testreports
env_vars: RUNNER_OS
flags: unit
-
name: Generate annotations
if: always()
uses: crazy-max/.github/.github/actions/gotest-annotations@5af0882e0496d2f7e98a53ae4048e3d86682496f
uses: crazy-max/.github/.github/actions/gotest-annotations@fa6141aedf23596fb8bdcceab9cce8dadaa31bd9
with:
directory: ./bin/testreports
-
name: Upload test reports
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: test-reports
name: test-reports-${{ matrix.os }}
path: ./bin/testreports
-
name: Dump context
Expand All @@ -134,7 +134,7 @@ jobs:
*.platform=freebsd/amd64
-
name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: buildkit-freebsd-amd64
path: ${{ env.DESTDIR }}/*
Expand All @@ -154,7 +154,7 @@ jobs:
uses: actions/checkout@v4
-
name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: buildkit-freebsd-amd64
path: ${{ env.DESTDIR }}
Expand Down
Loading