Skip to content

docker-push-scratch-image-docker #17

docker-push-scratch-image-docker

docker-push-scratch-image-docker #17

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
jobs:
release-binaries:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Build binaries
run: |
make build-all-binaries
ls -la
ls -la .build/
./package-github-binaries.sh
ls -la dist/
- name: Add binaries to release
uses: ncipollo/release-action@v1
with:
artifacts: "dist/*"
allowUpdates: true
omitBodyDuringUpdate: true
docker-push-scratch-image-docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push scratch image
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm,linux/arm64
push: true
tags: "latest,${{ github.ref_name }},"
target: scratch-release
context: .
build_args: "TAG=${{ github.ref_name }},SHA1=${{ github.sha }}"