File tree Expand file tree Collapse file tree 3 files changed +21
-10
lines changed Expand file tree Collapse file tree 3 files changed +21
-10
lines changed Original file line number Diff line number Diff line change @@ -83,3 +83,8 @@ for t in "$MAJOR_TAG" "$MINOR_TAG" "$NEW_TAG"; do
83
83
sha=$( echo " $resp " | jq -r ' .object.sha' )
84
84
echo " $t -> $sha "
85
85
done
86
+
87
+ # Output tags for the next steps
88
+ echo " major=$MAJOR_TAG " >> $GITHUB_OUTPUT
89
+ echo " minor=$MINOR_TAG " >> $GITHUB_OUTPUT
90
+ echo " patch=$NEW_TAG " >> $GITHUB_OUTPUT
Original file line number Diff line number Diff line change @@ -41,20 +41,20 @@ jobs:
41
41
EVENT_TYPE : >-
42
42
${{
43
43
contains(fromJSON('["push", "workflow_dispatch"]'), github.event_name) && 'mirror-push' ||
44
- github.event_name == 'workflow_call ' && 'mirror-tag ' ||
45
- github.event_name == 'delete' && 'mirror-delete-ref ' || ''
44
+ github.event_name == 'delete ' && 'mirror-delete-ref ' ||
45
+ inputs.released-tag != null && 'mirror-tag ' || ''
46
46
}}
47
47
PAYLOAD_KEY : >-
48
48
${{
49
49
contains(fromJSON('["push", "workflow_dispatch"]'), github.event_name) && 'source_branch' ||
50
- github.event_name == 'workflow_call ' && 'tag_name ' ||
51
- github.event_name == 'delete' && 'delete_ref ' || ''
50
+ github.event_name == 'delete ' && 'delete_ref ' ||
51
+ inputs.released-tag != null && 'tag_name ' || ''
52
52
}}
53
53
PAYLOAD_VALUE : >-
54
54
${{
55
55
contains(fromJSON('["push", "workflow_dispatch"]'), github.event_name) && github.ref_name ||
56
- github.event_name == 'workflow_call ' && inputs.released-tag ||
57
- github.event_name == 'delete' && github.event.ref || ''
56
+ github.event_name == 'delete ' && github.event.ref ||
57
+ inputs.released-tag != null && inputs.released-tag || ''
58
58
}}
59
59
steps :
60
60
- name : Trigger ${{ env.EVENT_TYPE}} with payload ${{ env.PAYLOAD_KEY}}=${{ env.PAYLOAD_VALUE}}
Original file line number Diff line number Diff line change 47
47
contents : write
48
48
pull-requests : write
49
49
outputs :
50
- tag_name : ${{ steps.publish_release.outputs.tag_name }}
50
+ major_tag : ${{ steps.update_tags.outputs.major }}
51
+ minor_tag : ${{ steps.update_tags.outputs.minor }}
52
+ patch_tag : ${{ steps.update_tags.outputs.patch }}
51
53
steps :
52
54
- uses : actions/checkout@v4
53
55
@@ -60,22 +62,26 @@ jobs:
60
62
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
61
63
62
64
- name : Update/create dynamic tags
65
+ id : update_tags
63
66
env :
64
67
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
65
68
run : >
66
69
.github/scripts/update_dynamic_tags.sh "${{ steps.publish_release.outputs.tag_name }}"
67
70
68
71
trigger-mirror :
69
- name : Trigger tag mirroring workflow
72
+ name : Trigger tag mirroring
70
73
needs : release
74
+ strategy :
75
+ matrix :
76
+ released-tag : ["${{ needs.release.outputs.major_tag }}", "${{ needs.release.outputs.minor_tag }}", "${{ needs.release.outputs.patch_tag }}"]
71
77
uses : ./.github/workflows/mirror.yml
72
78
with :
73
- released-tag : ${{ needs.release.outputs.tag_name }}
79
+ released-tag : ${{ matrix.released-tag }}
74
80
75
81
post :
76
82
name : Post Action
77
83
runs-on : ubuntu-latest
78
- needs : release
84
+ needs : trigger-mirror
79
85
if : always()
80
86
steps :
81
87
# Check status of the worklfow
You can’t perform that action at this time.
0 commit comments