docker-icinga2/action.yml
2023-01-17 17:43:09 +01:00

40 lines
1.0 KiB
YAML

# 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 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'
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 '${{ github.ref_name }}'
- if: github.event_name != 'release' && github.event_name != 'push'
shell: bash
run: |
'${{ github.action_path }}/build.bash' . all