-
Notifications
You must be signed in to change notification settings - Fork 7
46 lines (40 loc) · 1.42 KB
/
update_base_images.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
name: Update docker base images
on:
workflow_dispatch: # allow manual trigger
schedule:
- cron: '0 3 * * 0' # every sunday at 03:00 UTC
jobs:
latest-tags:
runs-on: ubuntu-latest
outputs:
main_tag: ${{ steps.main_tag.outputs.main_tag }}
next_tag: ${{ steps.next_tag.outputs.next_tag }}
steps:
- name: Checkout sources 🔰
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get latest main tag
id: main_tag
run: echo "main_tag=$(git tag | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -n1 | sed 's/^v//')" | tee -a $GITHUB_OUTPUT
- name: Get latest next tag
id: next_tag
run: echo "next_tag=$(git tag | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+(-next\.[0-9]+)?$' | sort -V | tail -n1 | sed 's/^v//')" | tee -a $GITHUB_OUTPUT
update-main:
needs: latest-tags
uses: ./.github/workflows/release_docker.yml
with:
release_is_published: "true"
release_version: ${{ needs.latest-tags.outputs.main_tag }}
secrets:
nexus_user: ${{ secrets.NEXUS_USERNAME}}
nexus_pass: ${{ secrets.NEXUS_PASSWORD}}
update-next:
needs: latest-tags
uses: ./.github/workflows/release_docker.yml
with:
release_is_published: "true"
release_version: ${{ needs.latest-tags.outputs.next_tag }}
secrets:
nexus_user: ${{ secrets.NEXUS_USERNAME}}
nexus_pass: ${{ secrets.NEXUS_PASSWORD}}