build(deps): bump docker/setup-buildx-action in the updates group (#48) #53
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.6.1 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3.3.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.5.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 }} |