workflows/sync_pull-requests: bump to 0.7.4

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2026-02-05 22:38:54 +01:00
parent 191ff20e1e
commit aa8a02fd3d
2 changed files with 34 additions and 3 deletions
@@ -27,12 +27,14 @@ jobs:
LABEL_ADDED: ${{ github.event.action == 'labeled' && github.event.label.name || '' }}
REVIEW_STATE: ${{ github.event.review.state }}
ACTOR: ${{ github.actor }}
ACTION: ${{ github.event.action }}
run: |
mkdir -p ./context
echo "$PR_NUMBER" > ./context/pr-number
echo "$LABEL_ADDED" > ./context/label-added
echo "$REVIEW_STATE" > ./context/review-state
echo "$ACTOR" > ./context/actor
echo "$ACTION" > ./context/action
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
+32 -3
View File
@@ -2,14 +2,17 @@ name: Sync Pull Requests
on:
workflow_run:
workflows: ['Sync Pull Requests Trigger']
workflows: ['Sync Pull Requests Trigger', 'CI', 'E2E Linux']
types:
- completed
jobs:
# Runs when Sync Pull Requests Trigger completes (PR events like opened, labeled, reviewed)
run:
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success'
if: >
github.event.workflow_run.name == 'Sync Pull Requests Trigger' &&
github.event.workflow_run.conclusion == 'success'
steps:
- name: Harden Runner
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
@@ -37,10 +40,11 @@ jobs:
core.setOutput('label-added', fs.readFileSync('./context/label-added', 'utf8').trim());
core.setOutput('review-state', fs.readFileSync('./context/review-state', 'utf8').trim());
core.setOutput('actor', fs.readFileSync('./context/actor', 'utf8').trim());
core.setOutput('action', fs.readFileSync('./context/action', 'utf8').trim());
- name: Backstage PR automation
if: steps.download.outcome == 'success'
uses: backstage/actions/pr-automation@d98113056c83b1b0a1293c8310d77d99db4ea22e # v0.7.3
uses: backstage/actions/pr-automation@d8f699b19b0d328865976ef5f4982dfa97db9952 # v0.7.4
with:
app-id: ${{ secrets.BACKSTAGE_GOALIE_APPLICATION_ID }}
private-key: ${{ secrets.BACKSTAGE_GOALIE_PRIVATE_KEY }}
@@ -51,3 +55,28 @@ jobs:
label-added: ${{ steps.context.outputs.label-added }}
review-state: ${{ steps.context.outputs.review-state }}
actor: ${{ steps.context.outputs.actor }}
action: ${{ steps.context.outputs.action }}
# Runs when CI or E2E workflows complete to update priority based on check status
update-on-ci:
runs-on: ubuntu-latest
if: >
(github.event.workflow_run.name == 'CI' || github.event.workflow_run.name == 'E2E Linux') &&
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.pull_requests[0]
steps:
- name: Harden Runner
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
with:
egress-policy: audit
- name: Backstage PR automation
uses: backstage/actions/pr-automation@d8f699b19b0d328865976ef5f4982dfa97db9952 # v0.7.4
with:
app-id: ${{ secrets.BACKSTAGE_GOALIE_APPLICATION_ID }}
private-key: ${{ secrets.BACKSTAGE_GOALIE_PRIVATE_KEY }}
installation-id: ${{ secrets.BACKSTAGE_GOALIE_INSTALLATION_ID }}
project-owner: backstage
project-number: '14'
pr-number: ${{ github.event.workflow_run.pull_requests[0].number }}
action: synchronize