More variable cleanups
All checks were successful
Build container image / Build and push image (push) Successful in 1m40s

This commit is contained in:
2025-12-06 16:51:32 +09:00
parent c454118bdd
commit 615e5724d0

View File

@@ -15,6 +15,9 @@ on:
env: env:
REGISTRY: ${{ vars.REGISTRY || 'davejansen.dev' }} REGISTRY: ${{ vars.REGISTRY || 'davejansen.dev' }}
REGISTRY_USERNAME: ${{ github.actor }}
IMAGE_TAG: ${{ vars.IMAGE_TAG || 'latest' }}
IMAGE_NAME: ${{ github.event.repository.name }}
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}-${{ group: ${{ github.workflow }}-${{ github.ref || github.run_id }}-${{
@@ -35,7 +38,7 @@ jobs:
- name: Prepare environment - name: Prepare environment
run: | run: |
# Lowercase the image uri # Lowercase the image uri
echo "IMAGE_REGISTRY=${IMAGE_REGISTRY,,}" >> ${GITHUB_ENV} echo "REGISTRY=${REGISTRY,,}" >> ${GITHUB_ENV}
echo "IMAGE_NAME=${IMAGE_NAME,,}" >> ${GITHUB_ENV} echo "IMAGE_NAME=${IMAGE_NAME,,}" >> ${GITHUB_ENV}
- name: Checkout - name: Checkout
@@ -57,7 +60,7 @@ jobs:
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: ${{ env.REGISTRY }} registry: ${{ env.REGISTRY }}
username: ${{ github.actor }} username: ${{ env.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }} password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push image - name: Build and push image
@@ -65,7 +68,7 @@ jobs:
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
with: with:
push: true push: true
tags: davejansen/caddy-bunny:latest tags: ${{ env.REGISTRY }}/${{ env.REGISTRY_USERNAME }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
# #
# # This section is optional and only needs to be enabled if you plan on distributing # # This section is optional and only needs to be enabled if you plan on distributing