Skip to content

Commit

Permalink
FIX: Make a single coolname not one for each image
Browse files Browse the repository at this point in the history
  • Loading branch information
thclark authored Jan 21, 2022
1 parent 0814a7d commit 5ebdd3b
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,29 @@ on:
workflow_dispatch:

jobs:
coolname:
runs-on: ubuntu-latest
timeout-minutes: 2
outputs:
name: ${{ steps.generator.outputs.name }}
steps:
- name: Generate name
uses: thclark/coolname-generator-action@main
id: generator
with:
separator: '-'
length: '2'
style: 'lowerCase'

docker:
needs: coolname
strategy:
matrix:
python: ["3.8", "3.9"]
gdal: ["2.4.1"]
mode: ["slim", "dev"]
runs-on: ubuntu-latest
timeout-minutes: 300
outputs:
name: ${{ steps.generator.outputs.name }}
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -59,7 +72,7 @@ jobs:
BASE_IMAGE=${{ steps.vars.outputs.base_image }}
INSTALL_DEV_TOOLS=${{ steps.vars.outputs.install_dev_tools }}
push: true
tags: windpioneers/gdal-python:${{ steps.generator.outputs.name }}-gdal-${{ matrix.gdal }}-python-${{ matrix.python }}-${{ matrix.mode }}
tags: windpioneers/gdal-python:${{ needs.coolname.outputs.name }}-gdal-${{ matrix.gdal }}-python-${{ matrix.python }}-${{ matrix.mode }}

# - name: Duplicate image from DockerHub to GCR
# TODO as we've used buildx we can copy the image to gcr.io with the same hash. See:
Expand All @@ -72,7 +85,7 @@ jobs:
release:
needs: docker
runs-on: ubuntu-latest
timeout-minutes: 300
timeout-minutes: 5
steps:

- name: test generator output
Expand All @@ -83,6 +96,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, no need to create your own.
with:
tag_name: ${{needs.docker.outputs.name}}
release_name: ${{needs.docker.outputs.name}}
tag_name: ${{ needs.coolname.outputs.name }}
release_name: ${{ needs.docker.coolname.name }}
draft: true

0 comments on commit 5ebdd3b

Please sign in to comment.