Bump github.com/go-playground/validator/v10 from 10.22.1 to 10.26.0 (… #50
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 Docker Image" | |
on: | |
pull_request: | |
types: [ opened, synchronize ] | |
paths-ignore: | |
- '.run/**' | |
- 'docs/**' | |
- 'deployments/**' | |
- 'scripts/**' | |
- '*.md' | |
branches: | |
- main | |
- v2 | |
push: | |
paths-ignore: | |
- '.run/**' | |
- 'docs/**' | |
- 'deployments/**' | |
- 'scripts/**' | |
- '*.md' | |
branches: | |
- main | |
- v2 | |
jobs: | |
build: | |
name: Build a Docker image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Cache Docker layers | |
uses: actions/cache@v4 | |
with: | |
path: go-build-cache | |
key: ${{ runner.os }}-go-build-cache-${{ hashFiles('**/go.sum') }} | |
- name: inject go-build-cache into docker | |
# v1 was composed of two actions: "inject" and "extract". | |
# v2 is unified to a single action. | |
uses: reproducible-containers/[email protected] | |
with: | |
cache-source: go-build-cache | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: Generate Docker metadata | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
xblaz3kx/chargepi | |
tags: | | |
type=ref,event=branch | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=sha,event=pr | |
flavor: | | |
latest=true | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
target: chargepi | |
build-args: | | |
READER_CONNECTION_TYPE="pn532_uart" | |
file: ./build/Dockerfile | |
platforms: linux/arm64 | |
push: ${{ github.event_name == 'push' }} | |
tags: ${{ steps.meta.outputs.tags }} |