removed github version number and added tag version - test #9
Workflow file for this run
This file contains 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: WebGSM-Docker # Build and Publish | |
on: | |
push: | |
tags: | |
- 'v*.*.*' # This will trigger the action on tag pushes like v1.0.0 | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Set up Docker | |
uses: docker/setup-buildx-action@v2 | |
- name: Set lowercase repository owner | |
run: echo "REPOSITORY_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV | |
- name: Log in to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: true | |
tags: | | |
ghcr.io/${{ env.REPOSITORY_OWNER }}/webgsm:latest | |
ghcr.io/${{ env.REPOSITORY_OWNER }}/webgsm:${{ github.ref_name }} # Using the tag name that triggered the action |