build(deps): bump golang from 1.23.1-bookworm to 1.23.2-bookworm #176
Workflow file for this run
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
on: push | |
name: Build & test | |
jobs: | |
build: | |
name: Build Docker Image | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: set up qemu virt with platforms | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: arm64,arm | |
- name: set up docker buildx builder with platforms | |
uses: docker/setup-buildx-action@v3 | |
with: | |
platforms: linux/amd64,linux/arm64,linux/arm/v7 | |
- name: create metadata (tags and labels) | |
uses: docker/metadata-action@v5 | |
id: meta | |
with: | |
images: parkr/ping | |
flavor: | | |
latest=false | |
tags: | | |
type=raw,value=${{ github.sha }} | |
labels: | | |
org.opencontainers.image.documentation=https://github.com/${{github.repository}}#readme | |
org.opencontainers.image.licenses=MIT | |
- name: build test image | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
load: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: test image executable will run | |
run: | | |
docker run --rm ${{ steps.meta.outputs.tags }} -h | |
- name: login to the Docker registry | |
uses: docker/login-action@v3 | |
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' }} | |
with: | |
registry: docker.io | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: push to registry (unless pull request) | |
uses: docker/build-push-action@v6 | |
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' }} | |
with: | |
context: . | |
push: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
platforms: linux/amd64,linux/arm64,linux/arm/v7 | |
test: | |
name: Run Go Tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.22" | |
- run: go test ./... |