Add new action to create docker image #4
Workflow file for this run
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 for GHCR | |
on: | |
push: | |
branches: [ "main" ] | |
paths: | |
- docker/** | |
pull_request: | |
branches: [ "main" ] | |
paths: | |
- docker/** | |
jobs: | |
build_and_publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build and push the image | |
run: | | |
docker login --username filippobrizzi --password ${{ secrets.GH_PAT }} ghcr.io | |
cd ${{github.workspace}}/docker | |
./build.sh | |
source ./version.sh | |
docker image tag ${IMAGE}:latest ghcr.io/filippobrizzi/${IMAGE}:latest | |
docker push ghcr.io/filippobrizzi/${IMAGE}:latest |