Skip to content

Commit

Permalink
fix: container runtime full archive upstream update (#508)
Browse files Browse the repository at this point in the history
Signed-off-by: Austin Vazquez <[email protected]>
  • Loading branch information
austinvazquez authored Jan 18, 2025
1 parent d7d0fdb commit 69b5a96
Showing 1 changed file with 16 additions and 11 deletions.
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

0 comments on commit 69b5a96

Please sign in to comment.