Update docker-image.yml #5
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: Docker Image CI | |
on: | |
push: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Login to packages container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set tag var | |
id: vars | |
run: echo "docker_tag=$(echo ${GITHUB_REF} | cut -d'/' -f3)-${GITHUB_SHA}" >> $GITHUB_OUTPUT | |
- name: Build the Docker image | |
run: docker build . --file Dockerfile --tag glitchtip-apprise:${{ steps.vars.outputs.docker_tag }} | |
- name: Tag latest | |
run: docker tag glitchtip-apprise:${{ steps.vars.outputs.docker_tag }} glitchtip-apprise:latest | |
- name: Push docker image | |
run: docker push --all-tags glitchtip-apprise |