name: Release on: push: tags: - 'v*' permissions: contents: read packages: write jobs: docker: name: Build and Push Docker Image runs-on: ubuntu-latest container: image: catthehacker/ubuntu:act-latest steps: - name: Set image name shell: bash run: echo "IMAGE_NAME=git.keithsolomon.net/${GITHUB_REPOSITORY_OWNER,,}/NetTrak" >> "$GITHUB_ENV" - name: Checkout uses: actions/checkout@v4 - name: Log in to Registry uses: docker/login-action@v3 with: registry: git.keithsolomon.net username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Docker metadata id: meta uses: docker/metadata-action@v5 with: images: ${{ env.IMAGE_NAME }} tags: | type=ref,event=tag type=raw,value=latest,enable=${{ !contains(github.ref_name, '-') }} - name: Build and push image uses: docker/build-push-action@v6 with: context: . file: ./Dockerfile push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}