Skip to content

Trigger Docker image build #8

Trigger Docker image build

Trigger Docker image build #8

Workflow file for this run

name: 'Trigger Docker image build'
on:
workflow_dispatch:
release:
types: [published]
jobs:
trigger:
name: 'trigger Docker image build'
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Get git branch name
id: get_branch
run: |
echo branch="${GITHUB_REF#refs/heads/}" >> "$GITHUB_OUTPUT"
- name: Generate a token
id: generate_token
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
with:
app_id: ${{ secrets.TEMPORAL_CICD_APP_ID }}
private_key: ${{ secrets.TEMPORAL_CICD_PRIVATE_KEY }}
- name: Dispatch docker builds Github Action
env:
PAT: ${{ steps.generate_token.outputs.token }}
PARENT_REPO: temporalio/docker-builds
PARENT_BRANCH: ${{ toJSON('main') }}
WORKFLOW_ID: update-submodules.yml
REPO: ${{ toJSON('cli') }}
BRANCH: ${{ toJSON(steps.get_branch.outputs.branch) }}
COMMIT: ${{ toJSON( ${{ github.sha }} ) }}

Check failure on line 38 in .github/workflows/trigger-publish.yml

View workflow run for this annotation

GitHub Actions / Trigger Docker image build

Invalid workflow file

The workflow is not valid. .github/workflows/trigger-publish.yml (Line: 38, Col: 19): Unexpected symbol: '${{'. Located at position 9 within expression: toJSON( ${{ github.sha
run: |
curl -fL -X POST -H "Accept: application/vnd.github.v3+json" -H "Authorization: token $PAT" "https://api.github.com/repos/$PARENT_REPO/actions/workflows/$WORKFLOW_ID/dispatches" -d '{"ref":'"$PARENT_BRANCH"', "inputs": { "repo":'"$REPO"', "branch":'"$BRANCH"', "commit": '"$COMMIT"' }}'