Skip to content

Fix yaml issue in Readme.md #3

Fix yaml issue in Readme.md

Fix yaml issue in Readme.md #3

Workflow file for this run

name: Build and Push Docker Image
on:
push:
tags:
- "v*"
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write # Required to push to GHCR
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Log in to GitHub Container Registry (GHCR)
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
- name: Extract Tag Version
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Build Docker Image
run: |
docker build -t ghcr.io/${{ github.repository }}:${{ env.VERSION }} .
- name: Push Docker Image
run: |
docker push ghcr.io/${{ github.repository }}:${{ env.VERSION }}