Skip to content

Sync from upstream

Sync from upstream #99

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: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_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")
git push --tags