Skip to content

UpdateReleases

UpdateReleases #51

name: UpdateReleases
on: [create]
jobs:
update_releases:
runs-on: ubuntu-latest
steps:
- name: Update refs/heads/releases to ${{ github.ref }}
run: |
if [[ `basename ${{ github.ref }}` == +([0-9]*.*.*) ]]
then
curl --request PATCH \
--url https://api.github.com/repos/${{ github.repository }}/git/refs/heads/releases \
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
--header 'content-type: application/json' \
--data '{ "sha": "${{ github.sha }}", "force": true }'
curl -X POST \
-H "Authorization: Token ${{ secrets.OSC_TOKEN }}" \
https://api.opensuse.org/trigger/runservice
fi