@@ -28,34 +28,22 @@ jobs:
2828 runs-on : ubuntu-latest
2929
3030 steps :
31- # ------------------------------------------------------------
32- # Resolve checkout ref and image tag
33- # - If triggered by a release event, use the release tag for both ref and image tag
34- # - Otherwise, prefer `inputs.img_tag` (short form) and fallback to `inputs.git_tag`
35- # This ensures `git_tag` is required and independent of `img_tag`.
36- # ------------------------------------------------------------
31+ # -------------------------------------------------------------
32+ # Use local action to resolve git ref and image tag from inputs
33+ # -------------------------------------------------------------
3734 - name : Resolve tags
3835 id : resolve_tags
39- run : |
40- if [[ "${{ github.event_name }}" == "release" ]]; then
41- echo "ref=${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT
42- echo "tag=${{ github.event.release.name }}" >> $GITHUB_OUTPUT
43- else
44- echo "ref=${{ inputs.git_tag }}" >> $GITHUB_OUTPUT
45- if [[ -n "${{ inputs.img_tag }}" ]]; then
46- echo "tag=${{ inputs.img_tag }}" >> $GITHUB_OUTPUT
47- else
48- echo "tag=${{ inputs.git_tag }}" >> $GITHUB_OUTPUT
49- fi
50- fi
36+ uses : firefly/.github/actions/resolve-tags
37+ with :
38+ git_tag : ${{ inputs.git_tag }}
39+ img_tag : ${{ inputs.img_tag }}
5140
5241 # ------------------------------------------------------------
53- # Checkout firefly repo at the resolved ref
42+ # Checkout firefly (this repo)
5443 # ------------------------------------------------------------
5544 - name : Checkout Firefly
5645 uses : actions/checkout@v4
5746 with :
58- repository : Caltech-IPAC/firefly
5947 ref : ${{ steps.resolve_tags.outputs.ref }}
6048 path : firefly
6149
9987 file : firefly/docker/Dockerfile
10088 platforms : linux/amd64,linux/arm64
10189 push : ${{ github.event_name == 'release' || inputs.push_image == 'true' }}
102- tags : ghcr.io/${{ github.repository }}:${{ steps.resolve_tags.outputs.tag }}
90+ # docker buildx does not allow uppercase letters in tags, so we convert to lowercase here
91+ tags : ghcr.io/caltech-ipac/firefly:${{ steps.resolve_tags.outputs.tag }}
10392 build-args : |
10493 env=ops
10594 cache-from : type=gha
0 commit comments