OSC integration fixed

This commit is contained in:
Alexander Pevzner
2019-12-19 21:45:20 +03:00
parent 909a693ece
commit 720a448782
+12 -11
View File
@@ -6,15 +6,16 @@ jobs:
update_releases:
runs-on: ubuntu-latest
steps:
- name: Update refs/heads/releases
- name: Update refs/heads/releases to ${{ github.ref }}
run: |
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
}'
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