-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (54 loc) · 1.73 KB
/
docker-publish.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
name: Docker
on:
schedule:
- cron: '30 1 * * 1' # run every Monday at 01:30
workflow_dispatch:
push:
branches: [ "*" ]
tags: [ "*" ]
pull_request:
branches: [ "main" ]
# Make sure there is no pipeline running uselessly.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
set_date:
runs-on: ubuntu-latest
outputs:
date_today: ${{ steps.date_step.outputs.today }}
steps:
- id: date_step
run: echo "today=$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT"
publish_release:
if: github.event.pull_request.merged == true
needs: set_date
uses: famedly/github-workflows/.github/workflows/docker.yml@49401388492ed7fe3eeb13fbefacf68168e9bc64
with:
push: true
image_name: rust-container
tags: |
type=raw,value=nightly
type=raw,value=nightly-${{needs.set_date.outputs.date_today}}
build_args: |
NIGHTLY_VERSION_DATE=${{needs.set_date.outputs.date_today}}
registry: docker-oss.nexus.famedly.de
registry_user: ${{ vars.NEXUS_REGISTRY_USER }}
secrets: inherit
publish_dev:
if: github.event.pull_request.merged != true
needs: set_date
uses: famedly/github-workflows/.github/workflows/docker.yml@49401388492ed7fe3eeb13fbefacf68168e9bc64
with:
push: true
image_name: rust-container
tags: |
type=ref,event=branch,prefix=dev-
type=ref,event=tag,prefix=dev-
type=raw,event=pr,value=dev-${{ github.head_ref }}
type=sha,prefix=dev-
build_args: |
NIGHTLY_VERSION_DATE=${{needs.set_date.outputs.date_today}}
registry: docker-nightly.nexus.famedly.de
registry_user: ${{ vars.NEXUS_REGISTRY_USER }}
secrets: inherit