Skip to content

Merge pull request #13 from planetscale/renovate/go-golang.org-x-net-… #43

Merge pull request #13 from planetscale/renovate/go-golang.org-x-net-…

Merge pull request #13 from planetscale/renovate/go-golang.org-x-net-… #43

Workflow file for this run

name: create release assets
on:
push:
branches:
- main
paths-ignore:
- README.md
- doc/**
- examples/**
- .github/**
- renovate.json5
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: login to ghcr.io
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- name: Calculate new version with autotag
id: autotag
run: |
curl -sL https://git.io/autotag-install | sh -s -- -b "${RUNNER_TEMP}/bin"
set -x
version=$(${RUNNER_TEMP}/bin/autotag -n)
echo "version=${version}" >> $GITHUB_ENV
echo "version=${version}" >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3
- name: Cache
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
id: cache
with:
path: |
go-pkg-mod
go-build
key: ${{ runner.os }}-go-cache-${{ hashFiles('**/go.sum') }}-v2
- name: inject go caches into docker
uses: reproducible-containers/buildkit-cache-dance@5b6db76d1da5c8b307d5d2e0706d266521b710de # v3.1.2
with:
cache-map: |
{
"go-pkg-mod": "/go/pkg/mod",
"go-build": "/root/.cache/go-build"
}
skip-extraction: ${{ steps.cache.outputs.cache-hit }}
- name: Build and push
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/planetscale/k8s-node-tagger:v${{ steps.autotag.outputs.version }}
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "v${version}" \
--target main \
--title "v${version}" \
--generate-notes