Skip to content

Commit 1f1beb5

Browse files
authored
fix(ci): package promotion logic and diagnostics (#33)
1 parent 41dac1c commit 1f1beb5

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

.github/workflows/.pr-close.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
required: false
1515
type: string
1616
packages:
17-
description: 'Comma-separated list of packages to promote'
17+
description: 'Space-separated list of packages to promote'
1818
required: false
1919
type: string
2020

@@ -55,21 +55,25 @@ on:
5555

5656
jobs:
5757
vars:
58-
if: ${{ inputs.packages != '' &&
59-
github.event.pull_request.merged == 'true' &&
60-
github.event.pull_request.base.ref == inputs.merge_branch }}
58+
if: inputs.packages != ''
6159
runs-on: ubuntu-22.04
6260
outputs:
6361
packages: ${{ steps.packages.outputs.packages }}
6462
steps:
6563
- id: packages
6664
run: |
6765
# Convert packages to JSON array for job matrix
68-
echo "packages=$(jq -cn '$ARGS.positional' --args ${{ inputs.packages }})"
6966
echo "packages=$(jq -cn '$ARGS.positional' --args ${{ inputs.packages }})" >> $GITHUB_OUTPUT
7067
68+
- run: |
69+
# Diagnostic vars
70+
echo "packages=$(jq -cn '$ARGS.positional' --args ${{ inputs.packages }})"
71+
echo "github.event.pull_request.merged = ${{ github.event.pull_request.merged }}"
72+
echo "github.event.pull_request.base.ref = ${{ github.event.pull_request.base.ref }}"
73+
7174
retags:
7275
name: Retags
76+
if: github.event.pull_request.merged == 'true' && github.event.pull_request.base.ref == inputs.merge_branch
7377
needs: vars
7478
runs-on: ubuntu-22.04
7579
permissions:
@@ -79,11 +83,6 @@ jobs:
7983
package: ${{ fromJson(needs.vars.outputs.packages) }}
8084
timeout-minutes: 1
8185
steps:
82-
- run: |
83-
# Output conditional run vars
84-
echo "github.event.pull_request.merged = ${{ github.event.pull_request.merged }} (expected true)"
85-
echo "github.event.pull_request.base.ref = ${{ github.event.pull_request.base.ref }} (expected main)"
86-
8786
- uses: shrink/actions-docker-registry-tag@v4
8887
with:
8988
registry: ghcr.io

0 commit comments

Comments
 (0)