Skip to content

.github/workflows/publish.yaml #17

.github/workflows/publish.yaml

.github/workflows/publish.yaml #17

Workflow file for this run

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