Skip to content

Final workflow fix

Final workflow fix #46

Workflow file for this run

name: Publish Docker image
on: [push, release]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "docker login"
run: |
docker login --username ${{ secrets.DOCKER_USER }} --password ${{ secrets.DOCKER_PASSWORD }}
- name: "docker build"
run: docker build . --file Dockerfile --tag ${{ secrets.DOCKER_USER }}/rhole:${{github.sha}}
- name: "docker push"
run: docker push ${{ secrets.DOCKER_USER }}/rhole:${{github.sha}}
- name: "rename latest tag"
if: ${{ github.event_name == 'release' }}
run: docker tag ${{ secrets.DOCKER_USER }}/rhole:${{github.sha}} ${{ secrets.DOCKER_USER }}/rhole:latest
- name: "docker push latest"
if: ${{ github.event_name == 'release' }}
run: docker push ${{ secrets.DOCKER_USER }}/rhole:latest