-
Notifications
You must be signed in to change notification settings - Fork 5
74 lines (66 loc) · 2.05 KB
/
kuksa-client.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
name: kuksa_client_docker
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
paths:
- ".github/workflows/kuksa-client.yml"
- "kuksa-client/**"
workflow_dispatch:
jobs:
checkrights:
uses: ./.github/workflows/check_push_rights.yml
secrets: inherit
build:
runs-on: self-hosted
needs: checkrights
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Docker meta
id: meta
uses: docker/[email protected]
with:
# list of Docker images to use as base name for tags
images: |
ghcr.io/eclipse/kuksa.val/kuksa-client
# generate Docker tags based on the following events/attributes
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Log in to the Container registry
if: needs.checkrights.outputs.have_secrets == 'true'
uses: docker/login-action@v2
with:
registry: ${{ needs.checkrights.outputs.registry }}
username: kuksa-bot
password: ${{ secrets.PUSH_CONTAINER_TOKEN }}
- name: Build kuksa command line client docker and push to ghcr.io
if: needs.checkrights.outputs.have_secrets == 'true'
uses: docker/build-push-action@v2
with:
platforms: |
linux/amd64
linux/arm64
context: .
file: kuksa-client/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Build ephemereal kuksa command line client docker and push to ttl.sh
if: needs.checkrights.outputs.have_secrets == 'false'
uses: docker/build-push-action@v2
with:
platforms: |
linux/amd64
linux/arm64
context: .
file: kuksa-client/Dockerfile
push: true
tags: "ttl.sh/kuksa.val/kuksa-client:8h"
labels: ${{ steps.meta.outputs.labels }}