build(deps): bump docker/build-push-action in the updates group (#43) #48
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 image" | |
on: | |
push: | |
branches: | |
- master | |
- "test/**" | |
tags: | |
- "[0-9]+.[0-9]+" | |
- "[0-9]+.[0-9]+.[0-9]+" | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4.1.7 | |
- name: Setup Docker Buildx | |
uses: docker/setup-buildx-action@v3.3.0 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3.2.0 | |
with: | |
username: ${{ secrets.DOCKERHUB_USER }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5.5.1 | |
with: | |
images: | | |
itzg/mongo-backups | |
flavor: | | |
latest=${{ github.ref_name == 'master' }} | |
- name: Image build and push | |
uses: docker/build-push-action@v6.2.0 | |
with: | |
context: . | |
platforms: linux/amd64 | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
# ensure latest base image is used | |
pull: true | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
labels: ${{ steps.meta.outputs.labels }} |