icinga2/.github/workflows/docker.yml

41 lines
1000 B
YAML

name: Docker image
on:
pull_request: {}
push:
branches:
- master
- 'support/*'
release:
types:
- published
jobs:
docker-release:
if: github.event_name == 'release'
concurrency: docker-release
runs-on: ubuntu-latest
steps:
- name: Docker image
uses: Icinga/docker-icinga2@master
with:
dockerhub-token: '${{ secrets.DOCKER_HUB_PERSONAL_TOKEN }}'
docker:
if: github.event_name != 'release'
runs-on: ubuntu-latest
steps:
- name: Cancel previous jobs for the same PR
if: "github.event_name == 'pull_request'"
uses: styfle/cancel-workflow-action@89f242ee29e10c53a841bfe71cc0ce7b2f065abc
with:
workflow_id: deb.yml,docker.yml,raspbian.yml,rpm.yml,windows.yml
access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Docker image
uses: Icinga/docker-icinga2@master
with:
dockerhub-token: '${{ secrets.DOCKER_HUB_PERSONAL_TOKEN }}'