mirror of
https://github.com/linuxserver/docker-code-server.git
synced 2024-11-26 22:15:41 +01:00
30 lines
1.4 KiB
YAML
30 lines
1.4 KiB
YAML
|
name: Package Trigger Main
|
||
|
|
||
|
on:
|
||
|
workflow_dispatch:
|
||
|
|
||
|
jobs:
|
||
|
package-trigger-master:
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- uses: actions/checkout@v2.3.3
|
||
|
|
||
|
- name: Package Trigger
|
||
|
if: github.ref == 'refs/heads/master'
|
||
|
run: |
|
||
|
if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_CODE_SERVER_MASTER }}" ]; then
|
||
|
echo "Github secret PAUSE_PACKAGE_TRIGGER_CODE_SERVER_MASTER is set; skipping trigger."
|
||
|
exit 0
|
||
|
fi
|
||
|
echo "Package trigger running off of master branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_CODE_SERVER_MASTER\"."
|
||
|
response=$(curl -iX POST \
|
||
|
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-code-server/job/master/buildWithParameters?PACKAGE_CHECK=true \
|
||
|
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
|
||
|
buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
|
||
|
buildurl="${buildurl%$'\r'}"
|
||
|
curl -iX POST \
|
||
|
"${buildurl}submitDescription" \
|
||
|
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \
|
||
|
--data-urlencode "description=GHA package trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
||
|
--data-urlencode "Submit=Submit"
|