Fix yaml issue in Readme.md #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 }} |