fix release #3
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 Container' | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- 'v*' | |
branches: | |
- main | |
env: | |
repo: ghcr.io/atonomic/scrapegoat | |
context_path: . | |
image: scrapegoat | |
tag: 0.1.0 | |
dockerfile_path: GoatFile | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
name: build and push image | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: Log in to GitHub Packages | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and Push Docker Image | |
run: | | |
docker build ${{ env.context_path }} --tag ${{ env.repo }}/${{ env.image }}:${{ env.tag }} -f ${{ env.dockerfile_path }} | |
docker push ${{ env.repo }}/${{ env.image }}:${{ env.tag }} |