Skip to content

Commit

Permalink
Merge pull request #1244 from gboeing/docker
Browse files Browse the repository at this point in the history
update docker build/push workflow
  • Loading branch information
gboeing authored Dec 8, 2024
2 parents d070c6a + df995d3 commit 8b8276b
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
workflow_dispatch:

jobs:
build:
ci:
name: Python ${{ matrix.python-version }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
name: Build/Publish Docker Hub Image
name: Build and publish Docker image

on:
push:
tags:
- 'v*'
schedule:
- cron: "0 8 * * 1" # every monday at 08:00 UTC
workflow_dispatch:

jobs:
build_push_docker_image:
if: ${{ github.repository == 'gboeing/osmnx' }}
name: Build/push image to Docker Hub
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
packages: write

steps:
- name: Checkout repo
Expand All @@ -31,12 +30,16 @@ jobs:
with:
images: ${{ github.repository }}

- name: Set up Docker buildx
uses: docker/setup-buildx-action@v3

- name: Build and push Docker image
if: github.repository == 'gboeing/osmnx'
uses: docker/build-push-action@v6
env:
DOCKER_BUILD_RECORD_UPLOAD: false
with:
context: .
file: ./environments/docker/Dockerfile
platforms: linux/amd64,linux/arm64
push: false
push: ${{ github.event_name != 'schedule' }}
tags: ${{ steps.meta.outputs.tags }}
3 changes: 2 additions & 1 deletion .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ on:
workflow_dispatch:

jobs:
build:
test_build:
if: ${{ github.repository == 'gboeing/osmnx' }}
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ on:
workflow_dispatch:

jobs:
build:
test_latest:
if: ${{ github.repository == 'gboeing/osmnx' }}
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test-minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ on:
workflow_dispatch:

jobs:
build:
test_minimal:
if: ${{ github.repository == 'gboeing/osmnx' }}
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
Expand Down

0 comments on commit 8b8276b

Please sign in to comment.