mirror of
https://github.com/librenms/docker.git
synced 2026-07-23 18:29:26 +00:00
Update workflow
This commit is contained in:
parent
06f5b8caa4
commit
ab70d73625
1 changed files with 14 additions and 16 deletions
30
.github/workflows/build.yml
vendored
30
.github/workflows/build.yml
vendored
|
|
@ -1,20 +1,18 @@
|
|||
name: build
|
||||
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: master
|
||||
tags: '*'
|
||||
paths:
|
||||
- '.github/workflows/build.yml'
|
||||
- 'rootfs/**'
|
||||
- 'Dockerfile'
|
||||
branches:
|
||||
- 'master'
|
||||
tags:
|
||||
- '*'
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
pull_request:
|
||||
branches: master
|
||||
paths:
|
||||
- '.github/workflows/build.yml'
|
||||
- 'rootfs/**'
|
||||
- 'Dockerfile'
|
||||
branches:
|
||||
- 'master'
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
|
@ -58,23 +56,23 @@ jobs:
|
|||
run: |
|
||||
docker buildx build --output "type=image,push=false" ${{ steps.prepare.outputs.buildx_args }}
|
||||
- name: Docker Login
|
||||
if: success() && github.event_name != 'pull_request'
|
||||
if: success() && github.event_name != 'pull_request' && endsWith(github.ref, github.repository.default_branch)
|
||||
env:
|
||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||
run: |
|
||||
echo "${DOCKER_PASSWORD}" | docker login --username "${{ steps.prepare.outputs.docker_username }}" --password-stdin
|
||||
-
|
||||
name: Docker Buildx (push)
|
||||
if: success() && github.event_name != 'pull_request'
|
||||
if: success() && github.event_name != 'pull_request' && endsWith(github.ref, github.repository.default_branch)
|
||||
run: |
|
||||
docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }}
|
||||
-
|
||||
name: Docker Check Manifest
|
||||
if: success() && github.event_name != 'pull_request'
|
||||
if: success() && github.event_name != 'pull_request' && endsWith(github.ref, github.repository.default_branch)
|
||||
run: |
|
||||
docker run --rm mplatform/mquery ${{ steps.prepare.outputs.docker_image }}:${{ steps.prepare.outputs.version }}
|
||||
-
|
||||
name: Clear
|
||||
if: always() && github.event_name != 'pull_request'
|
||||
if: always() && github.event_name != 'pull_request' && endsWith(github.ref, github.repository.default_branch)
|
||||
run: |
|
||||
rm -f ${HOME}/.docker/config.json
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue