Skip to content

Commit

Permalink
Fix #35 issue: now we have both tagged (aka stable) and development v…
Browse files Browse the repository at this point in the history
…ersions of images
  • Loading branch information
oshadura committed Oct 21, 2024
1 parent cd087ee commit 0b301a2
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 46 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/autotag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Create Tag

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: butlerlogic/action-autotag@stable
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
strategy: regex
regex_pattern: '\s*\[?.*release\]?: "?.*(\d{4}\.\d{1,2}\.\d+).*"?'
root: ".github/workflows/gh-ci.yaml"
25 changes: 0 additions & 25 deletions .github/workflows/autotag.yaml_debug

This file was deleted.

41 changes: 20 additions & 21 deletions .github/workflows/gh-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ env:
GITHUB_REF: ${{ github.ref }}
# Update each time there is added latest python: it will be used for `latest` tag
python_latest: "3.11"
release: 2024.9.0
releasev0: 0.7.22
release: "2024.9.1"
releasev0: "0.7.22"

jobs:

Expand Down Expand Up @@ -85,32 +85,31 @@ jobs:
releasev0: ${{ env.releasev0 }}
release: ${{ env.release }}
python_latest: ${{ env.python_latest}}
stable: ${{ startsWith(github.ref, 'refs/tags') }}
run: |
image="coffeateam/${image_dir}-${distro}"
image_default="coffeateam/${image_dir}"
if [ ${image_dir} == 'coffea-base' ]; then
tag="${image}:${releasev0}-py${python}"
# release tag or in case other case make it dev
if [ "$stable" == "true" ]; then
if [ ${image_dir} == 'coffea-base' ]; then
tag="${image}:${releasev0}-py${python}"
else
tag="${image}:${release}-py${python}"
fi
tags=${image}:latest-py${python},$tag
# latest tag
if [ ${python} == ${python_latest} ]; then
tags=${image}:latest,$tags
fi
else
tag="${image}:${release}-py${python}"
tag="${image}:dev-py${python}"
tags=$tag
if [ "$python" == ${python_latest} ]; then
tags=${image}:dev,$tags
fi
fi
## Default image name for dask-base and dask-dask
#if [ ${distro} == 'alma8' ]; then
# tag_default="${image_default}:${releasev0}-py${python},${image_default}:${release}-py${python}"
#fi
if [ ${python} == ${python_latest} ]; then
latest=${image}:latest
## Let's overwrite latest
#if [ ${distro} == 'alma8' ]; then
# latest="${image_default}:latest
#fi
fi
#tags=$tag,${image}:latest-py${python},$latest,$tag_default
tags=$tag,${image}:latest-py${python},$latest
echo "::set-output name=tag::${tag}"
echo "::set-output name=tags::${tags}"
Expand Down

0 comments on commit 0b301a2

Please sign in to comment.