Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
permissions:
contents: write
packages: write
runs-on: ubuntu-latest
runs-on: arc-runner-set
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -41,7 +41,7 @@ jobs:
path: ${{ env.REEVE_DB_MIGRATIONS_PATH }}

- name: ⛮ cf-gha-baseline
uses: cardano-foundation/cf-gha-workflows/./actions/cf-gha-baseline@main
uses: cardano-foundation/cf-gha-workflows/./actions/cf-gha-baseline@fix/pipx
id: cf-gha-baseline
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
21 changes: 18 additions & 3 deletions .github/workflows/close_pr_on_merged_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,37 @@ jobs:
contents: read
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SOURCE_BRANCH: "${{ github.event.client_payload.TRIGGERING_PAYLOAD.SOURCE_BRANCH }}"

steps:
- name: Validate source branch
run: |
if [[ -z "$SOURCE_BRANCH" ]]; then
echo "SOURCE_BRANCH is empty or missing – aborting"
exit 1
fi
- name: Skip protected branches
id: check_branch
env:
SOURCE_BRANCH: "${{ github.event.client_payload.sourceBranch }}"
run: |
if [[ "$SOURCE_BRANCH" == "main" || "$SOURCE_BRANCH" == "release/"* ]]; then
echo "Protected branch $SOURCE_BRANCH – skipping"
echo "skip=true" >> $GITHUB_OUTPUT
else
echo "skip=false" >> $GITHUB_OUTPUT
fi

- name: Check if PR exists
if: steps.check_branch.outputs.skip != 'true'
run: |
if ! gh pr view "$SOURCE_BRANCH" --repo ${{ github.repository }} >/dev/null 2>&1; then
echo "No open PR found for branch $SOURCE_BRANCH – nothing to close"
exit 0
fi

- name: Close PR
if: steps.check_branch.outputs.skip != 'true'
run: |
echo "Closing PR #$PR_NUMBER for branch $SOURCE_BRANCH"
echo "Closing PR for branch $SOURCE_BRANCH"
gh pr close $SOURCE_BRANCH \
--repo ${{ github.repository }} \
--comment "Closed automatically because the platform PR was merged."