Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/auto-tag-notify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Auto-tag and notify downstream

on:
# Use pull_request_target so secrets are available even for fork-based PRs
pull_request_target:
types: [closed]
branches: [zopen2]
release:
Copy link
Copy Markdown

@augmentcode augmentcode Bot May 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because this workflow also triggers on release: published, a merge run that creates a release will cause a second run and likely dispatch upstream-release twice. Please confirm the downstream can handle duplicate notifications (or has a dedupe mechanism) so this doesn’t trigger redundant downstream work.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

types: [published]

permissions:
contents: write
Comment thread
sachintu47 marked this conversation as resolved.

jobs:
auto-tag-and-notify:
if: >
(github.event_name == 'pull_request_target' && github.event.pull_request.merged == true) ||
github.event_name == 'release'
runs-on: ubuntu-latest
steps:
# Pin all actions to immutable commit SHAs for supply-chain security
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
Comment thread
sachintu47 marked this conversation as resolved.
with:
# For pull_request_target: checkout the merge commit on zopen2
# For release: checkout the release tag
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.merge_commit_sha || github.event.release.tag_name }}
Comment thread
sachintu47 marked this conversation as resolved.
fetch-depth: 0

# --- Tag creation (only on PR merge) ---
- name: Bump version and push tag
if: github.event_name == 'pull_request_target'
id: tag_version
uses: anothrNick/github-tag-action@4ed44965e0db8dab2b466a16da04aec3cc312fd8 # 1.75.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_BUMP: patch
WITH_V: true
TAG_CONTEXT: branch

- name: Create release with notes
if: github.event_name == 'pull_request_target' && steps.tag_version.outputs.new_tag
uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2.6.2
with:
tag_name: ${{ steps.tag_version.outputs.new_tag }}
name: ${{ steps.tag_version.outputs.new_tag }}
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# --- Downstream notification (runs even if tagging fails) ---
- name: Notify downstream zoslibport
Comment thread
sachintu47 marked this conversation as resolved.
if: '!cancelled()'
uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4.0.1
with:
token: ${{ secrets.BUMP_TOKEN }}
repository: zopencommunity/zoslibport
event-type: upstream-release
Loading