Skip to content

Fix yaml syntax errors. #5

Fix yaml syntax errors.

Fix yaml syntax errors. #5

Workflow file for this run

name: Publish Webhook Images
on:
push:
tags:
- v*
env:
REGISTRY: docker.io
REPO: rancher
jobs:
ci:
uses: rancher/webhook/.github/workflows/ci.yaml@${{github.base_ref}}

Check failure on line 14 in .github/workflows/publish.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/publish.yaml

Invalid workflow file

error parsing called workflow ".github/workflows/publish.yaml" -> "rancher/webhook/.github/workflows/ci.yaml@${{github.base_ref}}" : failed to fetch workflow: reference to workflow should be either a valid branch, tag, or commit
permissions:
contents: read
push:
needs:
- ci
permissions:
contents: read
id-token: write
name: Build and push Webhook images
runs-on: ubuntu-latest
steps:
- name: "Read vault secrets"
uses: rancher-eio/read-vault-secrets@main
with:
secrets: |
secret/data/github/repo/${{ github.repository }}/dockerhub/rancher/credentials username | DOCKER_USERNAME ;
secret/data/github/repo/${{ github.repository }}/dockerhub/rancher/credentials password | DOCKER_PASSWORD
- name : Checkout repository
# https://github.com/actions/checkout/releases/tag/v4.1.1
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_PASSWORD }}
# setup tag name
- if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: |
echo TAG_NAME=$(echo $GITHUB_REF | sed -e "s|refs/tags/||") >> $GITHUB_ENV
- name: Build and push the webhook image
uses: docker/build-push-action@v5
with:
context: .
file: ./package/Dockerfile
push: true
tags: ${{ env.REGISTRY }}/${{ env.REPO }}/webhook:${{ env.TAG_NAME }}
platforms: linux/amd64,linux/arm64