-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (49 loc) · 1.4 KB
/
release.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: release
permissions:
packages: write
on:
workflow_dispatch:
inputs:
version:
description: version
required: true
type: choice
options:
- major
- minor
- patch
jobs:
code-lint:
name: release
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4 # action page: <https://github.com/actions/setup-go>
with:
go-version: stable
- name: Generate next version
id: version
uses: ci-space/edit-config@master
with:
file: action.yaml
action: up-image-version
pointer: runs.image
value: ${{ github.event.inputs.version }}
- name: Generate builder values
id: values
run: |
echo "timestamp=$(echo $(date "+%F %T"))" >> $GITHUB_OUTPUT
- name: Build image
uses: docker/build-push-action@v4 # Action page: <https://github.com/docker/build-push-action>
with:
context: .
file: Dockerfile
push: true
platforms: linux/amd64,linux/arm64
build-args: |
APP_VERSION=${{ steps.version.inputs.new-version }}
BUILD_TIME=${{ steps.values.outputs.timestamp }}
tags: |
ghcr.io/ci-space/edit-config:${{ steps.values.outputs.version_full}}