-
Notifications
You must be signed in to change notification settings - Fork 585
99 lines (82 loc) · 2.72 KB
/
backend-ee-release.yml
File metadata and controls
99 lines (82 loc) · 2.72 KB
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Backend EE Docker Release
on:
push:
tags:
- 'backend-ee/v*'
permissions:
contents: write
packages: write
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}/digger-backend-ee
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Derive version
id: meta
run: |
TAG="${GITHUB_REF_NAME}" # e.g. backend-ee/v1.2.3
VERSION="${TAG##*/}" # v1.2.3
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: docker-meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=${{ steps.meta.outputs.version }}
type=ref,event=tag
type=raw,value=latest
- uses: depot/setup-action@v1
- uses: depot/build-push-action@v1
with:
project: kcld4zgwzx
token: ${{ secrets.DEPOT_TOKEN }}
context: .
file: ./Dockerfile_backend_ee
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.docker-meta.outputs.tags }}
labels: ${{ steps.docker-meta.outputs.labels }}
build-args: |
COMMIT_SHA=${{ github.sha }}
VERSION=${{ steps.meta.outputs.version }}
create-release:
needs: [build-and-push]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Derive version
id: meta
run: |
TAG="${GITHUB_REF_NAME}" # e.g. backend-ee/v1.2.3
VERSION="${TAG##*/}" # v1.2.3
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
name: Digger Backend EE ${{ steps.meta.outputs.version }}
body: |
## Digger Backend (Enterprise Edition) ${{ steps.meta.outputs.version }}
Terraform orchestration service with advanced features and multi-VCS support.
### Docker Image
```bash
docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }}
```
draft: false
prerelease: false