Some checks failed
Build and Publish Docker Container / build (push) Failing after 13m16s
47 lines
1.2 KiB
YAML
47 lines
1.2 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: 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
|
|
with:
|
|
registry: git.joshuacoles.me
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
- name: Build and Push Docker image
|
|
uses: docker/build-push-action@master
|
|
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
|