1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-01-20 18:52:16 +00:00
kyverno/.github/workflows/pr-update.yaml
Charles-Edouard Brétéché 7ab9d95970
fix: condition jobs in gh workflows (#5926)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-01-06 18:10:49 +00:00

38 lines
978 B
YAML

name: PR update
on:
push:
branches:
- 'main'
- 'release-*'
jobs:
checksecret:
runs-on: ubuntu-latest
outputs:
result: ${{ steps.check.outputs.result }}
steps:
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Check secret
id: check
uses: ./.github/actions/is-defined
with:
value: ${{ secrets.PR_UPDATE_TOKEN }}
autoupdate:
needs: [checksecret]
if: needs.checksecret.outputs.result == 'true'
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Automatically update PR
uses: adRise/update-pr-branch@437fab6e0ac7d2a668f2c479f64225edd7f303fd # v0.6.0
with:
token: ${{ secrets.PR_UPDATE_TOKEN }}
base: ${{ github.ref_name }}
required_approval_count: 1
require_passed_checks: false
sort: updated
direction: asc