-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (47 loc) · 1.54 KB
/
docker-build-release.yaml
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
---
name: Update image in GHCR
run-name: >
${{
github.event_name == 'delete' && format(
'Delete `{0}{1}`',
github.event.ref_type == 'branch' && 'branch-' || '',
github.event.ref
)
|| github.ref == 'refs/heads/main' && 'Update `dev`'
|| format(
'Update `{0}{1}`',
!startsWith(github.ref, 'refs/tags') && 'branch-' || '',
github.ref_name
)
}} docker tag
on:
push:
branches-ignore: ['gh-pages']
tags: ['v*']
delete:
jobs:
push-or-delete-image:
runs-on: ubuntu-latest
name: Update GitHub Container Registry
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Read YAML
id: getversion
uses: mikefarah/[email protected]
with:
cmd: yq '.nextflow_version' run-nextflow-tests/docker-metadata.yaml
- name: Get date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- uses: uclahs-cds/tool-Docker-action@v2
with:
metadata-file: run-nextflow-tests/docker-metadata.yaml
context: run-nextflow-tests
custom-tags: |
type=raw,enable=${{github.event_name == 'push' && github.ref == 'refs/heads/main'}},value=${{steps.getversion.outputs.result}}
type=raw,enable=${{github.event_name == 'push' && github.ref == 'refs/heads/main'}},value=${{steps.getversion.outputs.result}}-${{steps.date.outputs.date}}
# Uncomment if you expect to use non-SemVer release tags
# non-semver-tags: true