chore(deps): update actions/checkout digest to cbb7224 #571
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- v* | |
pull_request: | |
branches: | |
- main | |
jobs: | |
push_to_registry: | |
name: Build and push Docker image to Docker Hub | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@3b9b8c884f6b4bb4d5be2779c26374abadae0871 | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@766400ca14a75010e7b2e3119aa0d5b46826e8c7 | |
with: | |
images: mrtwnklr/apprise-it-for-me | |
tags: | | |
type=semver,pattern={{version}} | |
type=edge | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@12d39e1bb9d7a0e024b9de8b339a19115b2950fb | |
# for caching of docker layers see: | |
# https://evilmartians.com/chronicles/build-images-on-github-actions-with-docker-layer-caching | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@2dd22fa31c04297d369158eb483250f578504a9f | |
with: | |
install: true | |
- name: Cache Docker layers | |
uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-multi-buildx-${{ hashFiles('Pipfile*') }}-${{ hashFiles('Dockerfile') }} | |
restore-keys: | | |
${{ runner.os }}-multi-buildx-${{ hashFiles('Pipfile*') }} | |
${{ runner.os }}-multi-buildx- | |
- name: Log in to Docker Hub | |
uses: docker/login-action@3da7dc6e2b31f99ef2cb9fb4c50fb0971e0d0139 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USER }} | |
password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@a3ae207c1434ab875aa11554ce639ff512f25e89 | |
with: | |
context: . | |
platforms: linux/amd64,linux/386,linux/arm64,linux/arm/v6,linux/arm/v7 | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new | |
- name: Move cache | |
run: | | |
rm -rf /tmp/.buildx-cache | |
mv /tmp/.buildx-cache-new /tmp/.buildx-cache |