Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Docker workflows #170

Merged
merged 1 commit into from
Jan 1, 2024
Merged
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
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
Loading