-
Notifications
You must be signed in to change notification settings - Fork 1
85 lines (62 loc) · 1.98 KB
/
build.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
73
74
75
76
77
78
79
80
81
82
83
84
85
name: build
on:
push:
workflow_dispatch:
env:
OWNER: ${{ github.repository_owner }}
FILE: renovate
IMAGE: ghcr.io/${{ github.repository_owner }}/renovate
BUILDKIT_PROGRESS: plain
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
packages: write
env:
TAG: latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Init
run: ./bin/init.sh
shell: bash
- name: docker-config
uses: containerbase/internal-tools@f022a1677af8af9a36c53589e1b07edb932a3c84 # v3.5.10
with:
command: docker-config
- name: Build the Docker image
run: docker buildx bake test
- name: Test run
run: docker compose --file docker-compose.test.yml run sut
env:
IMAGE: ${{ env.IMAGE }}:${{ env.TAG }}
- name: Log into registry
if: github.ref_name == 'main'
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
- name: Publish the Docker image
if: github.ref_name == 'main'
run: docker buildx bake build
release:
needs: build
permissions:
contents: write
runs-on: ubuntu-latest
if: github.ref_name == 'main'
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Init
run: ./bin/init.sh
- uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # v1.14.0
with:
allowUpdates: true
body: See https://github.com/renovatebot/renovate/releases/tag/${{ env.VERSION }} for more changes
commit: ${{ github.sha }}
name: ${{ env.VERSION }}
tag: v${{ env.VERSION }}
token: ${{ secrets.GITHUB_TOKEN }}