mirror of
https://github.com/manios/docker-nagios.git
synced 2026-07-19 01:13:56 +00:00
- Remove Dockerhub hooks directory. - Add CHANGELOG - Remove manifest yaml and update Dockerfile with latest labels. - Improve README and build also for linux/386 architecture.
63 lines
2 KiB
YAML
63 lines
2 KiB
YAML
name: Nagios Build
|
|
# This workflow is triggered on pushes to the repository.
|
|
# Taken from tutorial
|
|
# https://github.com/gitschooldude/hello
|
|
# https://www.youtube.com/watch?v=-xIXFxuZCMI
|
|
# https://github.com/marketplace/actions/docker-setup-buildx
|
|
# https://github.com/marketplace/actions/docker-login
|
|
on: [push]
|
|
|
|
jobs:
|
|
nagios-build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
-
|
|
name: Login to DockerHub
|
|
uses: docker/login-action@v1
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v2
|
|
-
|
|
name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v1
|
|
-
|
|
name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
-
|
|
name: Available platforms
|
|
run: echo ${{ steps.buildx.outputs.platforms }}
|
|
-
|
|
name: Cache Docker layers
|
|
uses: actions/cache@v2
|
|
id: cache
|
|
with:
|
|
path: /tmp/.buildx-cache
|
|
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
|
restore-keys: |
|
|
${{ runner.os }}-buildx-
|
|
-
|
|
name: Docker Buildx (build and cache)
|
|
run: |
|
|
docker buildx build \
|
|
--progress plain \
|
|
--cache-from "type=local,src=/tmp/.buildx-cache" \
|
|
--cache-to "type=local,dest=/tmp/.buildx-cache" \
|
|
--platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7 \
|
|
--tag manios/nagios:4.4.6 \
|
|
--output "type=image,push=true" .
|
|
-
|
|
name: Docker Buildx (push)
|
|
run: |
|
|
docker buildx build \
|
|
--progress plain \
|
|
--cache-from "type=local,src=/tmp/.buildx-cache" \
|
|
--platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7 \
|
|
--tag manios/nagios:4.4.6 \
|
|
--output "type=image,push=true" .
|
|
-
|
|
name: Inspect image
|
|
run: |
|
|
docker buildx imagetools inspect manios/nagios:4.4.6
|