fix: build and publish fix #4
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: Build and Publish Docker image | |
on: | |
push: | |
branches: main | |
workflow_run: | |
workflows: ["Lint and Test"] | |
types: | |
- completed | |
jobs: | |
build-and-publish: | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Login to Docker | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: kojicmarko | |
password: ${{ secrets.GHCR_PAT }} | |
- name: Build and publish the Docker image | |
run: | | |
docker build . -t ghcr.io/kojicmarko/final-pyweb-ghcr:latest | |
docker push ghcr.io/kojicmarko/final-pyweb-ghcr:latest |