-
Notifications
You must be signed in to change notification settings - Fork 30
/
action.yml
46 lines (37 loc) · 1.23 KB
/
action.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
# Icinga 2 Docker image | (c) 2020 Icinga GmbH | GPLv2+
name: Icinga 2 Docker image
inputs:
dockerhub-token:
default: ''
runs:
using: composite
steps:
- uses: actions/checkout@v3
- shell: bash
run: sudo apt-get update
- shell: bash
run: sudo apt-get install -y qemu-user-static binfmt-support
- shell: bash
run: docker buildx create --use
- if: inputs.dockerhub-token != ''
env:
PW: ${{ inputs.dockerhub-token }}
shell: bash
run: |
docker login -u icingaadmin --password-stdin <<<"$PW"
- if: github.event_name == 'release' || github.event_name == 'push'
shell: bash
run: git fetch --unshallow
- if: github.event_name == 'release'
shell: bash
run: |
'${{ github.action_path }}/build.bash' . push "$(tr -d v <<<'${{ github.ref_name }}')"
'${{ github.action_path }}/mktags.bash' '${{ github.ref_name }}'
- if: github.event_name == 'push'
shell: bash
run: |
'${{ github.action_path }}/build.bash' . push "$(tr / - <<<'${{ github.ref_name }}')"
- if: github.event_name != 'release' && github.event_name != 'push'
shell: bash
run: |
'${{ github.action_path }}/build.bash' . all