-
Notifications
You must be signed in to change notification settings - Fork 45
38 lines (38 loc) · 1.4 KB
/
release.yml
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
36
37
38
name: release
on:
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
tag:
# Friendly description to be shown in the UI instead of 'name'
description: 'tag and release to create'
# Input has to be provided for the workflow to run
required: true
env:
GITHUB_ENV: ".env"
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Install go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: ^1.23
- name: Check out code into the Go module directory
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Login to dockerhub to push the image
run: echo "${{ secrets.DockerHubToken }}" | docker login --username ${DOCKER_USER} --password-stdin
env:
DOCKER_USER: ${{ secrets.DockerHubUser }}
- name: run make release ${{ github.event.inputs.tag }}
run: make docker-build docker-push build-binaries
env:
TAG: ${{ github.event.inputs.tag }}
- name: Create Release
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8
with:
# uses the HEAD on the default branch when creating the tag
tag_name: ${{ github.event.inputs.tag }}
release_name: Release ${{ github.event.inputs.tag }}
files: |
clusterlint-*