From 554740c8b9478edfa40cfab903dfb4b5dfcb0826 Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 28 Dec 2024 21:40:40 +1300 Subject: [PATCH] First run of the actions --- .forgejo/workflows/image.yaml | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .forgejo/workflows/image.yaml diff --git a/.forgejo/workflows/image.yaml b/.forgejo/workflows/image.yaml new file mode 100644 index 0000000..5063262 --- /dev/null +++ b/.forgejo/workflows/image.yaml @@ -0,0 +1,43 @@ +name: Build and Push Updated Images +run-name: Build and Push Updated Images 🚀 +on: + push: + branches: + - main + paths: + - Dockerfile + workflow_dispatch: + +jobs: + build-image: + runs-on: docker + steps: + - name: Check out the repo + uses: actions/checkout@v4 + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action + with: + images: caddy + tags: | + type=schedule + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=sha + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build and push Docker image + id: push + uses: docker/build-push-action + with: + context: . + file: ./Dockerfile + push: false + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file