forked from Chia-Network/chia-blockchain
-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (34 loc) · 1.49 KB
/
trigger-docker-dev.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: 📦🚀 Trigger Dev Docker Build
on:
push:
paths-ignore:
- '**.md'
branches:
- 'long_lived/**'
- 'release/**'
pull_request:
paths-ignore:
- '**.md'
concurrency:
# SHA is added to the end if on `main` to let all main workflows run
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }}
cancel-in-progress: true
jobs:
trigger:
name: Trigger building a new dev tag for the chia-docker image
runs-on: ubuntu-latest
steps:
- name: Test for secrets access
id: check_secrets
shell: bash
run: |
unset HAS_SECRET
if [ -n "$GLUE_ACCESS_TOKEN" ]; then HAS_SECRET='true' ; fi
echo HAS_SECRET=${HAS_SECRET} >> $GITHUB_OUTPUT
env:
GLUE_ACCESS_TOKEN: "${{ secrets.GLUE_ACCESS_TOKEN }}"
- name: Trigger docker dev workflow via github-glue
if: steps.check_secrets.outputs.HAS_SECRET
run: |
curl -s -XPOST -H "Authorization: Bearer ${{ secrets.GLUE_ACCESS_TOKEN }}" --data '{"sha":"${{ github.sha }}"}' ${{ secrets.GLUE_API_URL }}/api/v1/docker-build-dev/${{ github.sha }}/start
curl -s -XPOST -H "Authorization: Bearer ${{ secrets.GLUE_ACCESS_TOKEN }}" --data '{"sha":"${{ github.sha }}"}' ${{ secrets.GLUE_API_URL }}/api/v1/docker-build-dev/${{ github.sha }}/success/build-dev