Skip to content

Commit

Permalink
Merge pull request #37 from SlothCroissant/staging
Browse files Browse the repository at this point in the history
Added automatic tagging, removed deprecated caddyBuilder.ps1
  • Loading branch information
SlothCroissant authored Sep 14, 2024
2 parents 7d90573 + fca0cc5 commit e3d7c41
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 76 deletions.
71 changes: 0 additions & 71 deletions .github/workflows/caddyBuilder.ps1

This file was deleted.

17 changes: 12 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ name: Docker Build & Push

on:
push:
tags:
- "*"
branches:
- main
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab

env:
Expand Down Expand Up @@ -33,9 +33,11 @@ jobs:
if: success()
id: prepare
run: |
echo "docker_platform=${DOCKER_TARGET_PLATFORM}" >> $GITHUB_OUTPUT
echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
re="^FROM caddy:([^-]+)"
str=$(cat Dockerfile)
tag=$(if [[ $str =~ $re ]]; then echo ${BASH_REMATCH[1]}; else exit 1; fi)
echo "tag=$tag" >> $GITHUB_OUTPUT
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
Expand Down Expand Up @@ -69,3 +71,8 @@ jobs:
ghcr.io/${{ env.DOCKER_USERNAME }}/${{ env.DOCKER_CONTAINER_NAME }}:latest
quay.io/${{ env.DOCKER_USERNAME }}/${{ env.DOCKER_CONTAINER_NAME }}:${{ steps.prepare.outputs.tag }}
quay.io/${{ env.DOCKER_USERNAME }}/${{ env.DOCKER_CONTAINER_NAME }}:latest
- name: Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.prepare.outputs.tag }}

0 comments on commit e3d7c41

Please sign in to comment.