Skip to content

Commit

Permalink
add more tags
Browse files Browse the repository at this point in the history
  • Loading branch information
p5 committed Dec 21, 2024
1 parent 971ff50 commit 1fcb5cb
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 3 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/build-kinoite-40.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,31 @@ jobs:
- name: Generate Tags
id: generate-tags
env:
IS_LATEST_VERSION: false
IS_GTS_VERSION: true
IS_BETA_VERSION: false
run: |
TIMESTAMP="$(date +%Y%m%d)"
SHA_SHORT="${GITHUB_SHA::7}"
TAGS=()
TAGS+=("${FEDORA_VERSION}")
if [[ "${IS_LATEST_VERSION}" == "true" ]]; then
TAGS+=("latest")
elif [[ "${IS_GTS_VERSION}" == "true" ]]; then
TAGS+=("gts")
elif [[ "${IS_BETA_VERSION}" == "true" ]]; then
TAGS+=("beta")
fi
TAGS+=("test")
TAGS+=("rs-test")
for TAG in "${TAGS[@]}"; do
TAGS+=("${TAG}-${TIMESTAMP}")
done
for TAG in "${TAGS[@]}"; do
TAGS+=("${TAG}-${SHA_SHORT}")
done
echo "TAGS=$(IFS=,; echo "${TAGS[*]}")" >> $GITHUB_OUTPUT
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ on:
description: "The build arguments to pass to the build"
required: false
type: string
output:
manifest-digest: ${{ jobs.manifest.outputs.manifest-digest }}

concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}-${{ inputs.fedora_version }}-${{ inputs.fedora_edition }}-${{ inputs.platforms }}
Expand Down Expand Up @@ -120,6 +122,8 @@ jobs:
manifest:
runs-on: ubuntu-latest
needs: build
outputs:
manifest-digest: ${{ steps.push-manifest.outputs.DIGEST }}
steps:
- name: Fetch Build Outputs
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
Expand Down Expand Up @@ -178,11 +182,17 @@ jobs:
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Push manifest
id: push-manifest
env:
TAGS: ${{ inputs.tags }}
MANIFEST: ${{ steps.create-manifest.outputs.MANIFEST }}
IMAGE_REGISTRY: ${{ inputs.image-registry }}
run: |
for tag in $(echo $TAGS | tr ',' '\n'); do
echo "podman manifest push --all=false $MANIFEST $IMAGE_REGISTRY/$tag"
echo "podman manifest push --digestfile=/tmp/digestfile --all=false $MANIFEST $IMAGE_REGISTRY/$tag"
done
# Temporarily populate the digest file with a dummy value
echo "dummy-digest" > /tmp/digestfile
echo "DIGEST=$(cat /tmp/digestfile)" >> $GITHUB_OUTPUT

0 comments on commit 1fcb5cb

Please sign in to comment.