Skip to content

Commit

Permalink
chore(ci): fix image release issue by hard-coding branch (#9757)
Browse files Browse the repository at this point in the history
  • Loading branch information
Water-Melon authored Jul 23, 2024
1 parent b1d2f67 commit dff7f02
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -762,9 +762,8 @@ jobs:

- name: Get latest commit SHA on master
run: |
echo "latest_sha=$(git ls-remote origin -h refs/heads/${{ github.event.inputs.default_branch }} | cut -f1)" >> $GITHUB_ENV
echo "latest_sha=$(git ls-remote origin -h refs/heads/master | cut -f1)" >> $GITHUB_ENV
type=raw,${{ needs.metadata.outputs.commit-sha }}-${{ matrix.label }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
Expand All @@ -783,8 +782,8 @@ jobs:
# 20230228, 20230228-{distro} (input.version is "nightly")
# {version}-20230228, {version}-20230228-{distro} (input.version is set and not on master)
tags: |
type=raw,value=latest,enable=${{ matrix.label == 'ubuntu' && github.ref_name == github.event.inputs.default_branch && env.latest_sha == needs.metadata.outputs.commit-sha }}
type=raw,value=latest,enable=${{ matrix.label == 'ubuntu' && github.ref_name == github.event.inputs.default_branch && env.latest_sha == needs.metadata.outputs.commit-sha }},suffix=
type=raw,value=latest,enable=${{ matrix.label == 'ubuntu' && github.ref_name == 'master' && env.latest_sha == needs.metadata.outputs.commit-sha }}
type=raw,value=latest,enable=${{ matrix.label == 'ubuntu' && github.ref_name == 'master' && env.latest_sha == needs.metadata.outputs.commit-sha }},suffix=
type=match,enable=${{ github.event_name == 'workflow_dispatch' && github.event.inputs.official == 'true' }},pattern=\d.\d,value=${{ github.event.inputs.version }}
type=match,enable=${{ github.event_name == 'workflow_dispatch' && matrix.label == 'ubuntu' && github.event.inputs.official == 'true' }},pattern=\d.\d,value=${{ github.event.inputs.version }},suffix=
type=raw,enable=${{ github.event_name == 'workflow_dispatch' }},${{ github.event.inputs.version }}
Expand Down

0 comments on commit dff7f02

Please sign in to comment.