Sync from upstream #121
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sync from upstream | |
on: | |
push: | |
branches: | |
- 'main' # Run at every sync | |
schedule: | |
- cron: '0 8 * * 5' # At 07:00 on every Friday | |
# Allows to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
sync-app-kyverno-repository: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Generate token | |
id: generate_token | |
uses: actions/create-github-app-token@v1 | |
with: | |
app-id: ${{ secrets.HERALD_APP_ID }} | |
private-key: ${{ secrets.HERALD_APP_KEY }} | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ steps.generate_token.outputs.token }} | |
fetch-depth: '1' | |
- run: | | |
# Fetch tags from upstream repo | |
git fetch https://github.com/kyverno/kyverno --tags | |
# Remove release candidates local tags | |
git tag -d $(git tag -l | grep -Ei "\-rc|\-beta|\-dev|\-chart|\-alpha") | |
git push --tags | |