-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (88 loc) · 2.94 KB
/
release.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Release New Version
on:
workflow_dispatch:
schedule:
- cron: '0 19 * * *'
push:
branches:
- main
env:
dockerhub_username: leonstoldt
image_name: ghostfolio-installer
ansible_image_tag_amd64: 2.17-alpine-3.19 # renovate: datasource=docker depName=willhallonline/ansible versioning=docker
ansible_image_tag_arm64: alpine
jobs:
integration-test:
name: Run Integration Tests
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: ./.github/actions/integration-test
release:
needs: [integration-test]
name: Build and push docker image
runs-on: ubuntu-latest
strategy:
max-parallel: 1
fail-fast: false
matrix:
include:
- platform: "amd64"
ansible_image_tag: "2.17-alpine-3.19" # renovate: datasource=docker depName=willhallonline/ansible versioning=docker
- platform: "arm64"
ansible_image_tag: "alpine"
permissions:
contents: write
packages: write
# This is used to complete the identity challenge with sigstore/fulcio when running outside of PRs.
id-token: write
# https://github.com/orgs/community/discussions/17245
outputs:
digests: ${{ steps.build.outputs.digests }}
tags_amd64: ${{ steps.build.outputs.tags_amd64 }}
publish_amd64: ${{ steps.build.outputs.publish_amd64 }}
tags_arm64: ${{ steps.build.outputs.tags_arm64 }}
publish_arm64: ${{ steps.build.outputs.publish_arm64 }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Pull latest changes
shell: bash
run: git pull
- uses: ./.github/actions/build-and-push
id: build
with:
platform: ${{ matrix.platform }}
ansible_image_tag: ${{ matrix.ansible_image_tag }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
gh-release:
needs: [ release ]
name: Create GitHub Release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: ./.github/actions/gh-release
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tags_amd64: ${{ needs.release.outputs.tags_amd64 }}
tags_arm64: ${{ needs.release.outputs.tags_arm64 }}
digests: ${{ needs.release.outputs.digests }}
released_docker: ${{ needs.release.outputs.publish_amd64 == 'true' || needs.release.outputs.publish_arm64 == 'true' }}
post-run:
needs: [ gh-release ]
name: Post-run
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: ./.github/actions/post-run
with:
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
release_tag: ${{ needs.gh-release.outputs.release_tag }}