Pin docker/build-push-action@v5 and add ntfy.sh action

This commit is contained in:
Joshua Coles 2024-06-03 21:12:02 +01:00
parent 92462bd316
commit fc1cea32b5

View File

@ -18,15 +18,15 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
# - name: Cache Docker layers
# uses: actions/cache@v3
# with:
# path: |
# /tmp/.buildx-cache.bookworm
# /tmp/.buildx-cache.latest
# key: ${{ runner.os }}-buildx-${{ github.sha }}
# restore-keys: |
# ${{ runner.os }}-buildx-
# - name: Cache Docker layers
# uses: actions/cache@v3
# with:
# path: |
# /tmp/.buildx-cache.bookworm
# /tmp/.buildx-cache.latest
# key: ${{ runner.os }}-buildx-${{ github.sha }}
# restore-keys: |
# ${{ runner.os }}-buildx-
- name: Login to Docker
uses: docker/login-action@v1
@ -36,7 +36,7 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and Push Docker image
uses: docker/build-push-action@master
uses: docker/build-push-action@v5
with:
context: .
push: true
@ -44,3 +44,11 @@ jobs:
tags: git.joshuacoles.me/${{ github.repository }}:latest,git.joshuacoles.me/${{ github.repository }}:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
- uses: robiningelbrecht/ntfy-action@v1.0.0
name: Notify via ntfy.sh
if: always()
with:
url: ${{ secrets.NTFY_URL }}
topic: ${{ secrets.NTFY_TOPIC }}
job_status: ${{ job.status }}