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

fix: container runtime full archive upstream update #508

Merged
Merged
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
27 changes: 16 additions & 11 deletions .github/workflows/update-dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
type: string
description: The tag of nerdctl full archive to update
required: false
default: 'latest'

permissions:
contents: read
Expand Down Expand Up @@ -56,44 +55,50 @@ jobs:
title: 'build(deps): Bump finch dependencies'
branch: create-pull-request/bump-finch-dependencies

fetch-nerdctl-latest-release:
fetch-latest-nerdctl-tag:
runs-on: ubuntu-latest

outputs:
tag: ${{ steps.latest-nerdctl-release.outputs.NERDCTL_TAG }}
tag: ${{ steps.fetch-tag.outputs.tag }}

steps:
- name: Checkout nerdctl
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: containerd/nerdctl
fetch-depth: 0
fetch-tags: true

- name: Fetch tag for latest release
id: nerdctl-latest-release
id: fetch-tag
run: |
tag=$(git tag --sort=-version:refname | head -n 1)
if [[ -n ${{ github.event.inputs.nerdctl_tag_override }} ]]; then
tag=${{ github.event.inputs.nerdctl_tag_override }}
tag="$(git tag --sort=-version:refname | head -n 1)"
echo "Latest tag is ${tag}"

if [[ -n "${{ github.event.inputs.nerdctl_tag_override }}" ]]; then
tag="${{ github.event.inputs.nerdctl_tag_override }}"
echo "Override tag: ${tag}"
fi
echo "NERDCTL_TAG=$tag" >> $GITHUB_OUTPUT

echo "tag=${tag}" >> "$GITHUB_OUTPUT"

update-container-runtime-full-archive:
runs-on: ubuntu-latest
needs: [fetch-nerdctl-latest-release]
needs: fetch-latest-nerdctl-tag

permissions:
contents: write
pull-requests: write

env:
NERDCTL_TAG: ${{ needs.fetch-nerdctl-latest-release.outputs.tag }}
NERDCTL_TAG: ${{ needs.fetch-latest-nerdctl-tag.outputs.tag }}

steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Update container runtime dependencies
run: bash bin/update-container-runtime-deps.sh -t ${{ env.NERDCTL_TAG }}
run: bash bin/update-container-runtime-full-archive.sh -t "${{ env.NERDCTL_TAG }}"

- name: Create PR
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6
Expand Down
Loading