Skip to content

Stable Release v1.1.5 #8

Stable Release v1.1.5

Stable Release v1.1.5 #8

Workflow file for this run

name: Create and publish a Docker image
on:
release:
types: [published]
jobs:
publish-ghcr-image:
runs-on: ubuntu-latest
steps:
# Checkout the code
- name: Checkout code
uses: actions/checkout@v4
# Log in to GHCR
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
# Extract version number from release
- name: Extract version
id: get_version
run: echo "VERSION=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
# Build the Docker image
- name: Build Docker image
run: |
docker build -f Dockerfile.release \
-t ghcr.io/${{ github.repository }}-alpine:${{ env.VERSION }} \
-t ghcr.io/${{ github.repository }}-alpine:latest .
# Push the Docker image
- name: Push Docker image
run: |
docker push ghcr.io/${{ github.repository }}-alpine:${{ env.VERSION }}
docker push ghcr.io/${{ github.repository }}-alpine:latest