Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions .github/workflows/buildx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
push:
branches:
- master
- main

permissions:
contents: read
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:

- name: Docker Buildx (build)
uses: docker/build-push-action@v7.4.0
if: success() && !contains(github.ref, 'master')
if: success() && github.ref_name != 'main'
with:
push: false
context: ./${{ matrix.docker-file.path }}
Expand All @@ -104,15 +104,15 @@ jobs:
tags: ${{ steps.prepare.outputs.tags }}

- name: Docker Login
if: success() && contains(github.ref, 'master')
if: success() && github.ref_name == 'main'
uses: docker/login-action@v4.6.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Docker Buildx (push)
uses: docker/build-push-action@v7.4.0
if: success() && contains(github.ref, 'master')
if: success() && github.ref_name == 'main'
with:
push: true
context: ./${{ matrix.docker-file.path }}
Expand All @@ -122,11 +122,23 @@ jobs:
tags: ${{ steps.prepare.outputs.tags }}

- name: Inspect Image
if: always() && github.event_name != 'pull_request' && contains(github.ref, 'master')
if: always() && github.event_name != 'pull_request' && github.ref_name == 'main'
run: |
docker buildx imagetools inspect ${{ steps.prepare.outputs.docker_image }}:${{ steps.prepare.outputs.version }}

- name: Clear
if: always() && github.event_name != 'pull_request'
run: |
rm -f ${HOME}/.docker/config.json

buildx-summary:
runs-on: ubuntu-latest
needs: buildx
if: always()

steps:
- name: Verify all matrix jobs passed
run: |
if [[ "${{ needs.buildx.result }}" != "success" ]]; then
exit 1
fi
14 changes: 13 additions & 1 deletion .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Test Docker image
on:
push:
branches:
- master
- main
pull_request:
workflow_dispatch:

Expand Down Expand Up @@ -71,6 +71,18 @@ jobs:
path: screenshots/
if-no-files-found: ignore

build-summary:
runs-on: ubuntu-latest
needs: build
if: always()

steps:
- name: Verify all matrix jobs passed
run: |
if [[ "${{ needs.build.result }}" != "success" ]]; then
exit 1
fi

auto-merge:
runs-on: ubuntu-latest
needs: build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/hadolint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ name: Lint Dockerfiles
on:
push:
branches:
- master
- main
pull_request:

permissions:
contents: read

jobs:
build:
hadolint:
runs-on: macos-latest
steps:
- uses: actions/checkout@v7.0.1
Expand Down
Loading