mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2026-09-05 02:24:21 -05:00
36 lines
1.4 KiB
YAML
36 lines
1.4 KiB
YAML
name: Trigger Dev Docker Build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'long_lived/**'
|
|
- 'release/**'
|
|
pull_request:
|
|
|
|
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 ::set-output name=HAS_SECRET::${HAS_SECRET}
|
|
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
|