Skip to content

Commit

Permalink
release: Allow releasing a binary from our fork
Browse files Browse the repository at this point in the history
And avoiding building the binary on every single GitHub action run on
Kata Containers / Confidential Containers.

Signed-off-by: Fabiano Fidêncio <[email protected]>
  • Loading branch information
fidencio committed Aug 31, 2023
1 parent e79f497 commit 4e300ce
Showing 1 changed file with 6 additions and 20 deletions.
26 changes: 6 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,35 +32,21 @@ jobs:
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
path: src/github.com/containerd/containerd

- name: Check signature
run: |
releasever=${{ github.ref }}
releasever="${releasever#refs/tags/}"
TAGCHECK=$(git tag -v ${releasever} 2>&1 >/dev/null) ||
echo "${TAGCHECK}" | grep -q "error" && {
echo "::error::tag ${releasever} is not a signed tag. Failing release process."
exit 1
} || {
echo "Tag ${releasever} is signed."
exit 0
}
working-directory: src/github.com/containerd/containerd
path: src/github.com/confidential-containers/containerd

- name: Release content
id: contentrel
run: |
RELEASEVER=${{ github.ref }}
echo "stringver=${RELEASEVER#refs/tags/v}" >> $GITHUB_OUTPUT
git tag -l ${RELEASEVER#refs/tags/} -n20000 | tail -n +3 | cut -c 5- >release-notes.md
working-directory: src/github.com/containerd/containerd
working-directory: src/github.com/confidential-containers/containerd

- name: Save release notes
uses: actions/upload-artifact@v3
with:
name: containerd-release-notes
path: src/github.com/containerd/containerd/release-notes.md
path: src/github.com/confidential-containers/containerd/release-notes.md

build:
name: Build Release Binaries
Expand Down Expand Up @@ -100,7 +86,7 @@ jobs:
# See https://github.com/containerd/containerd/issues/5098 for the context.
repository: ${{ github.repository }}
ref: ${{ github.ref }}
path: src/github.com/containerd/containerd
path: src/github.com/confidential-containers/containerd

- name: Setup buildx instance
uses: docker/setup-buildx-action@v2
Expand All @@ -123,14 +109,14 @@ jobs:
# Remove symlinks since we don't want these in the release Artifacts
find ./releases/ -maxdepth 1 -type l | xargs rm
working-directory: src/github.com/containerd/containerd
working-directory: src/github.com/confidential-containers/containerd
env:
PLATFORM: ${{ matrix.dockerfile-platform }}
- name: Save Artifacts
uses: actions/upload-artifact@v3
with:
name: release-tars-${{env.PLATFORM_CLEAN}}
path: src/github.com/containerd/containerd/releases/*.tar.gz*
path: src/github.com/confidential-containers/containerd/releases/*.tar.gz*

release:
name: Create containerd Release
Expand Down

0 comments on commit 4e300ce

Please sign in to comment.