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

Build vendor artifact #11764

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,34 @@ jobs:
with:
files: ./coverage.txt

vendor:
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
check-latest: true
cache: true
-
name: Build vendor
run: |
go mod vendor
mkdir -p bin/release
tar czf bin/release/docker-compose-vendor.tar.gz vendor
-
name: Upload artifacts
uses: actions/upload-artifact@v3

Choose a reason for hiding this comment

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

Is there a reason that we use actions/upload-artifact@v3 instead of v4? According to the action README, v3 will be deprecated in November.

Choose a reason for hiding this comment

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

Speaking of v4, some of the breaking changed in it relate to my other comment bellow about the aritfact name.

2. Uploading to the same named Artifact multiple times.

Due to how Artifacts are created in this new version, it is no longer possible to upload to the same named Artifact multiple times. You must either split the uploads into multiple Artifacts with different names, or only upload once. Otherwise you will encounter an error.

Copy link
Contributor

@ndeloof ndeloof May 6, 2024

Choose a reason for hiding this comment

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

aritfact name must be unique for a built commit, I don't think this has any impact for this workflow.

We still use upload-artifact@v3 on this repo as this breaking change require the whole workflow to be revisited to support the new behavior (see https://github.com/docker/compose/pull/11662/files)

Choose a reason for hiding this comment

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

aritfact name must be unique for a built commit, I don't think this has any impact for this workflow.

Ah ok, then this should be fine.

with:
name: compose
path: ./bin/release/*
if-no-files-found: error

release:
permissions:
contents: write # to create a release (ncipollo/release-action)
Expand Down