From 69b5a960c7a8612cf3d26b275dbc881f17681d9d Mon Sep 17 00:00:00 2001 From: Austin Vazquez <55906459+austinvazquez@users.noreply.github.com> Date: Fri, 17 Jan 2025 18:03:41 -0600 Subject: [PATCH] fix: container runtime full archive upstream update (#508) Signed-off-by: Austin Vazquez --- .github/workflows/update-dependencies.yaml | 27 +++++++++++++--------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/.github/workflows/update-dependencies.yaml b/.github/workflows/update-dependencies.yaml index 8ab6cda..83148aa 100644 --- a/.github/workflows/update-dependencies.yaml +++ b/.github/workflows/update-dependencies.yaml @@ -8,7 +8,6 @@ on: type: string description: The tag of nerdctl full archive to update required: false - default: 'latest' permissions: contents: read @@ -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