forked from ForgeRock/forgeops
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (62 loc) · 2.03 KB
/
main.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Tag on merge
on:
push:
branches:
- main
env:
REGISTRY: "us-docker.pkg.dev"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ vars.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Set tag
id: set_tag
#run: echo "BUILD_TAG=$(date +%Y%m%d)" >> $GITHUB_OUTPUT
run: echo "BUILD_TAG=$(date +%Y%m%d%H%M)" >> $GITHUB_ENV
- name: Build
id: bake
uses: docker/bake-action@v5
with:
source: "{{defaultContext}}:docker"
push: true
files: |
./docker-bake.hcl
#set: |
# default.TAG=${{ steps.set_tag.outputs.PR_TAG }}
- name: Install Helm
uses: azure/setup-helm@v4
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: Update chart version
id: update_chart_version
run: sed -ie "s/^version:.*/version: $BUILD_TAG/" charts/identity-platform/Chart.yaml && sed -ie "s/^appVersion:.*/appVersion: $BUILD_TAG/" charts/identity-platform/Chart.yaml
- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
charts_dir: charts
pages_branch: gh-pages
- name: Create tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
#custom_tag: ${{ steps.set_tag.outputs.PR_TAG }}
custom_tag: ${{ env.BUILD_TAG }}