Add automatic package generation (Github Actions) #2
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" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# Log in to the Container registry | |
- name: Log in to the Container registry | |
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GHCR_TOKEN }} | |
# Build the Docker image | |
- name: Build the Docker image | |
run: docker build . --file Dockerfile --tag aichan-cv:latest | |
# Push the Docker image to GHCR | |
- name: Push Docker images to GHCR | |
run: | | |
# Push the main app image | |
docker push ghcr.io/${{ github.repository_owner }}/aichan-cv:latest |