-
Notifications
You must be signed in to change notification settings - Fork 5
74 lines (64 loc) · 1.98 KB
/
docker-image.yml
File metadata and controls
74 lines (64 loc) · 1.98 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
name: Build Docker image
on:
workflow_dispatch:
push:
tags:
- '*.*.*'
branches:
- master
jobs:
build:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Create src directory
run: mkdir src
- name: Checkout opengever.maintenance
uses: actions/checkout@v4
with:
repository: 4teamwork/opengever.maintenance
path: src/opengever.maintenance
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: remote
endpoint: tcp://buildkitd.buildx:1234
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set Git commit env variables
run: |
echo "GIT_TAG=$(git describe --tags --candidates=0)" >> $GITHUB_ENV
echo "GIT_SHA_TAG=$(git describe --tags)" >> $GITHUB_ENV
echo "LATEST_TAG=$(git describe --tags --abbrev=0 origin/master)" >> $GITHUB_ENV
echo "BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
- name: Build and push ogcore
uses: docker/bake-action@v6
env:
GITLAB_DEPLOY_TOKEN: ${{ secrets.GITLAB_DEPLOY_TOKEN }}
with:
source: .
files: docker-bake.hcl
targets: ogcore
push: true
set: |
*.secrets=id=gldt,env=GITLAB_DEPLOY_TOKEN
- name: Build and push ogtestserver
uses: docker/bake-action@v6
env:
GITLAB_DEPLOY_TOKEN: ${{ secrets.GITLAB_DEPLOY_TOKEN }}
with:
source: .
files: docker-bake.hcl
targets: ogtestserver
push: true
set: |
*.secrets=id=gldt,env=GITLAB_DEPLOY_TOKEN