-
Notifications
You must be signed in to change notification settings - Fork 15
35 lines (35 loc) · 1.03 KB
/
release-tools.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: release-tools
on:
push:
tags:
- 'tools-*'
jobs:
release-cke-tools:
name: Release CKE tools image
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build CKE tools
run: |
cd tools
make all
- name: Extract tag
id: extract-tag
run: echo "tag=${GITHUB_REF#refs/tags/tools-}" >> $GITHUB_OUTPUT
- name: Log in to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push cke-tools
uses: docker/build-push-action@v5
with:
context: ./tools
push: true
platforms: linux/amd64
tags: ghcr.io/${{ github.repository_owner }}/cke-tools:${{ steps.extract-tag.outputs.tag }}
labels: org.opencontainers.image.source=https://github.com/${{ github.repository }}