Skip to content

still wip

still wip #33

name: Docker build and push
on:
push:
branches:
- '*'
tags:
- 'v*'
jobs:
cache:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: |
/tmp/.buildx-cache
key: ${{ runner.os }}-docker-${{ hashFiles('**/Dockerfile') }}
docker:
needs: cache
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
id-token: write
steps:
- name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ vars.DOCKERHUB_TOKEN }}
logout: true