.github/workflows/publish.yaml #17
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: Deploy Images to GHCR | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
env: | |
ALPINE_VERSION: ${{vars.ALPINE_VERSION}} | |
CADDY_VERSION: ${{vars.CADDY_VERSION}} | |
BUILD_VERSION: ${{vars.BUILD_VERSION}} | |
jobs: | |
push-store-image: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: '.' | |
steps: | |
- name: 'Checkout GitHub Action' | |
uses: actions/checkout@main | |
- name: 'Login to GitHub Container Registry' | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{github.actor}} | |
password: ${{secrets.GITHUB_TOKEN}} | |
- name: 'Build the image' | |
run: | | |
docker build . --tag ghcr.io/rubberverse/qor-caddy:latest --build-arg alpine_version=${{env.ALPINE_VERSION}} --build-arg caddy_version=${{env.CADDY_VERSION}} --build-arg build_version=${{env.BUILD_VERSION}} | |
docker push ghcr.io/rubberverse/qor-caddy:latest |