Skip to content

Create testWebhook

Create testWebhook #2

name: Manually publish container image using the last commit SHA as an image tag
on:
pull_request: # run on pull requests
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v4
- name: Print the pr last commit SHA (shortened)
if: ${{ github.event_name == 'pull_request' }}
run: echo "The commit SHA is ${{ github.event.pull_request.head.sha.substr(0, 7) }}"

Check failure on line 16 in .github/workflows/cicd-publish-api-image-pr.yaml

View workflow run for this annotation

GitHub Actions / Manually publish container image using the last commit SHA as an image tag

Invalid workflow file

The workflow is not valid. .github/workflows/cicd-publish-api-image-pr.yaml (Line: 16, Col: 12): Unexpected symbol: '('. Located at position 42 within expression: github.event.pull_request.head.sha.substr(0, 7)