Skip to content

Commit

Permalink
Update Docker workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
gerlero committed Jan 1, 2024
1 parent cc0d739 commit 65589d1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
21 changes: 9 additions & 12 deletions .github/workflows/docker.yml → .github/workflows/Docker.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,32 @@
name: Docker

on:
push:
branches:
- main
tags:
- '*'
tags: ['*']
pull_request:
branches:
- main
workflow_dispatch:
inputs:
arm64:
description: Build multi-platform image including arm64
multi-platform:
description: Build multi-platform image (amd64 and arm64)
type: boolean
required: false
default: false

concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
env:
IMAGES: |
${{ vars.DOCKERHUB_REPOSITORY || github.repository }}
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
if: inputs.arm64
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
if: inputs.arm64
uses: docker/setup-buildx-action@v3
- name: Docker meta
id: meta
Expand All @@ -52,7 +49,7 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v5
with:
platforms: ${{ (github.event_name == 'push' || inputs.arm64) && 'linux/amd64,linux/arm64' || '' }}
platforms: ${{ (inputs.multi-platform || github.event_name == 'push') && 'linux/amd64,linux/arm64' || '' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: | # Julia's Pkg expects a Git repository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ on:
- main
paths:
- README.md
- .github/workflows/dockerhub-description.yml
- .github/workflows/DockerHubDescription.yml
workflow_dispatch:

jobs:
dockerhub-description:
if: vars.DOCKERHUB_REPOSITORY
Expand Down

0 comments on commit 65589d1

Please sign in to comment.