Skip to content

Commit

Permalink
Update GH actions to support detection v0 versus calever version coffea
Browse files Browse the repository at this point in the history
and build relevant image instead
  • Loading branch information
oshadura committed Feb 9, 2024
1 parent 3d0f4ea commit c742a37
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/autotag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
strategy: regex
regex_pattern: 'releasev0: \"\d+\.\d+\.\d+\"'
regex_pattern: 'releasev0: \"0.\d+\.\d+\"'
root: ".github/workflows/gh-ci.yml"
- uses: butlerlogic/action-autotag@stable
with:
Expand Down
27 changes: 15 additions & 12 deletions .github/workflows/gh-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:
DOCKER_ORG: coffeateam
GITHUB_SHA: ${{ github.sha }}
GITHUB_REF: ${{ github.ref }}
release: "0.7.22"
release: "2024.1.0"
releasev0: "0.7.22"

jobs:
Expand All @@ -21,11 +21,11 @@ jobs:
strategy:
fail-fast: false
matrix:
image_dir: [basev0, dask]
image_dir: [coffea-basev0, coffea-dask]
distro: [alma8, ubuntu]
python: ["3.9", "3.10", "3.11"]
exclude:
- image_dir: alma8
- distro: alma8
python: 3.9
name: ${{ matrix.image_dir }}-${{ matrix.distro }}-${{ matrix.python }}
runs-on: ubuntu-latest
Expand Down Expand Up @@ -64,29 +64,32 @@ jobs:
python: ${{ matrix.python }}
distro: ${{ matrix.distro }}
run: |
image="coffeateam/coffea-${image_dir}-${distro}"
image="coffeateam/${image_dir}-${distro}"
if [ ${image_dir} == 'basev0' ]; then
if [ ${image_dir} == 'coffea-basev0' ]; then
tag="${image}:${releasev0}-py${python}"
release_image=${releasev0}
else
tag="${image}:${release}-py${python}"
release_image=${release}
fi
tags=${image}:latest-py${python},$tag
echo "::set-output name=tag::${tag}"
echo "::set-output name=tags::${tags}"
echo "::set-output name=release:_image:${release}"
- name: Build
uses: docker/build-push-action@v5
with:
load: true
tags: ${{ steps.tags.outputs.tag }}
context: ${{ matrix.image_dir }}/${{ matrix.distro }}
file: ${{ matrix.image_dir }}/${{ matrix.distro }}/Dockerfile
context: ${{ matrix.image_dir }}
file: ${{ matrix.image_dir }}/${{ matrix.distro }}Dockerfile.${{ matrix.distro }}
build-args: |
python=${{ matrix.python }}
release=${{ env.release }}
release=${{ steps.tags.outputs.release_image }}
- name: Test Conda environement
env:
Expand Down Expand Up @@ -117,11 +120,11 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ${{ matrix.image_dir }}
file: ${{ matrix.image_dir }}/Dockerfile
platforms: linux/amd64
push: ${{ github.event_name == 'push' }}
tags: ${{ steps.tags.outputs.tags }}
tags: ${{ steps.tags.outputs.tag }}
context: ${{ matrix.image_dir }}
file: ${{ matrix.image_dir }}/${{ matrix.distro }}Dockerfile.${{ matrix.distro }}
build-args: |
python=${{ matrix.python }}
release=${{ env.release }}
release=${{ steps.tags.outputs.release_image }}
3 changes: 2 additions & 1 deletion .github/workflows/watch-conda.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Get current Coffea version

- name: Get current Coffea version, both v0 and Calver
id: current_version
uses: the-coding-turtle/[email protected]
with:
Expand Down

0 comments on commit c742a37

Please sign in to comment.