Skip to content

Build and Deploy-deprecated #16

Build and Deploy-deprecated

Build and Deploy-deprecated #16

Workflow file for this run

name: Build and Deploy
on:
release:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}/api
jobs:
build-docker-image:
if: false
name: Create Docker image - ${{ github.event.release.tag_name }}
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
outputs:
API_IMAGE_TAG: ${{ fromJson(steps.meta.outputs.json).tags[0] }}
steps:
- name: Extract version
id: extract-version
run: |

Check failure on line 25 in .github/workflows/deploy.yaml

View workflow run for this annotation

GitHub Actions / Build and Deploy

Invalid workflow file

The workflow is not valid. .github/workflows/deploy.yaml (Line: 25, Col: 14): Unexpected symbol: 'tag_name#v'. Located at position 22 within expression: github.event.release.tag_name#v
echo ${{ github.event.release.tag_name#v }}
echo "version=${{ github.event.release.tag_name#v }}" >> $GITHUB_OUTPUT
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: latest=true
tags: |
type=raw,value=${{ steps.extract-version.outputs.version }}
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v5
with:
context: .
file: ./src/Bmb.Payment.Api/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=