Skip to content

Commit

Permalink
clean up create image tag
Browse files Browse the repository at this point in the history
  • Loading branch information
dtrai2 committed Dec 17, 2024
1 parent 8232941 commit aadd57c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/container-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@ jobs:
- name: Create Image Tags
id: image-tag
run: |
python -c "print('tags=', ', '.join([f'ghcr.io/fkie-cad/logprep:py${{ matrix.python-version }}-{tag.strip()}' for tag in '${{ inputs.tags }}'.split(',')]), sep='')" >> $GITHUB_OUTPUT
python - <<EOF
import os
image = "ghcr.io/fkie-cad/logprep"
version = "${{ matrix.python-version }}"
tags = "${{ input.tags }}".split(",")
full_image = [f"{image}:py{version}-{tag.strip()}" for tag in tags]
os.environ["GITHUB_OUTPUT"] = f"tags={','.join(full_image)}"
EOF
- name: Debug Image Tag
run: |
Expand All @@ -40,8 +47,6 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}



- name: Build image and export to Docker
uses: docker/build-push-action@v6
id: build-and-push
Expand Down

0 comments on commit aadd57c

Please sign in to comment.