All checks were successful
Build and Publish Docker Container / build (push) Successful in 16m35s
45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
name: Build and Publish Docker Container
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: catthehacker/ubuntu:act-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
- name: Login to Docker
|
|
uses: docker/login-action@v1
|
|
with:
|
|
registry: git.joshuacoles.me
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
- name: Build and Push Docker image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
push: true
|
|
file: ./Dockerfile.cache
|
|
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 }}
|