-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (52 loc) · 1.95 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
57
58
59
60
name: Release
on:
workflow_dispatch:
inputs:
releaseVersion:
description: 'Release version'
required: true
nextVersion:
description: 'Next version'
required: true
defaults:
run:
shell: nix develop -v -c bash {0}
jobs:
release:
name: Release ${{ github.event.inputs.releaseVersion }}
runs-on: [self-hosted, nix, general, arm64-linux, small]
timeout-minutes: 5
env:
IMAGE_REPOSITORY: public.ecr.aws/shopstic
RELEASE_VERSION: ${{ github.event.inputs.releaseVersion }}
NEXT_VERSION: ${{ github.event.inputs.nextVersion }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- id: determine-version
name: Determine current version
run: |-
CURRENT_VERSION=$(./release.sh get_release_version) || exit $?
echo "version=${CURRENT_VERSION}" >> $GITHUB_OUTPUT
- name: Push image manifest
env:
CURRENT_VERSION: ${{ steps.determine-version.outputs.version }}
run: |-
manifest-tool push from-args \
--platforms linux/amd64,linux/arm64 \
--template "${IMAGE_REPOSITORY}/toothpick-server:${CURRENT_VERSION}-ARCH" \
--target "${IMAGE_REPOSITORY}/toothpick-server:${RELEASE_VERSION}"
- name: Build and push Helm Chart
run: |-
export HELM_REGISTRY_CONFIG=/home/runner/.docker/config.json
./release.sh push_helm_chart "${RELEASE_VERSION}" "${RELEASE_VERSION}" "oci://${IMAGE_REPOSITORY}/charts"
- name: Create git tag
run: |-
git config --global user.email "[email protected]"
git config --global user.name "CI Runner"
git tag "${RELEASE_VERSION}"
git push origin --tags
echo "ThisBuild / version := \"${NEXT_VERSION}-SNAPSHOT\"" > ./version.sbt
git commit -a -m "Bump version to ${NEXT_VERSION}-SNAPSHOT"
git push origin main