docker-icinga2/action.yml
Julian Brost 26f92bb5c7
Run apt-get update in action.yml
GitHub does not so automatically so the package lists may be outdated, causing the package installation to fail:

    Err:1 http://azure.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 qemu-user-static amd64 1:6.2+dfsg-2ubuntu6.7
      404  Not Found [IP: 52.147.219.192 80]
    E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/universe/q/qemu/qemu-user-static_6.2%2bdfsg-2ubuntu6.7_amd64.deb  404  Not Found [IP: 52.147.219.192 80]
    E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
2023-05-02 11:30:12 +02:00

47 lines
1.2 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 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