-
Notifications
You must be signed in to change notification settings - Fork 13
72 lines (65 loc) · 2.08 KB
/
tag.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: Build and push Docker Image on Tag
on:
push:
tags:
- '[0-9]*'
jobs:
build_and_push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
tenants: [default, brb, n21, thr ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Docker meta Service Name for docker hub
id: docker_meta_img_hub
uses: docker/metadata-action@v5
with:
images: docker.io/schulcloud/schulcloud-client-${{ matrix.tenants }}, quay.io/schulcloudverbund/schulcloud-client-${{ matrix.tenants }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Log into docker registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Log into quay registry
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}
- name: Build and push ${{ github.repository }}
uses: docker/build-push-action@v6
env:
DOCKER_BUILD_RECORD_UPLOAD: false
with:
build-args: |
SC_THEME_BUILD=${{ matrix.tenants }}
context: .
file: ./Dockerfile
platforms: linux/amd64
push: true
pull: true
tags: ${{ steps.docker_meta_img_hub.outputs.tags }}
labels: ${{ steps.docker_meta_img_hub.outputs.labels }}
create_release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: generate sbom via dependency-graph
run: gh api repos/${{ github.repository }}/dependency-graph/sbom > dependencies.sbom.json
env:
GH_TOKEN: ${{ github.token }}
- name: create release
uses: softprops/action-gh-release@v2
with:
files: dependencies.sbom.json