Skip to content

Commit

Permalink
fix: 🐝 beta-ci workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
realashleybailey committed Nov 9, 2023
1 parent adf0634 commit 6044747
Showing 1 changed file with 9 additions and 31 deletions.
40 changes: 9 additions & 31 deletions .github/workflows/beta-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ on:
push:
tags:
- "v*.*.*-beta.*"
- "*"
workflow_dispatch:
inputs:
tag:
description: "Tag"
required: true

permissions:
packages: write
Expand Down Expand Up @@ -50,6 +44,9 @@ jobs:
# Checkout the repo
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false

# Use NPM and Node.js to install dependencies
- name: Use Node.js 18.18.2
Expand Down Expand Up @@ -127,11 +124,9 @@ jobs:
# Checkout the repo
- name: Checkout
uses: actions/checkout@v4

# Get the Release Version from latest
- name: Get the Release Version from latest
id: get_version
run: echo "::set-output name=version::$(cat latest)"
with:
fetch-depth: 0
persist-credentials: false

# Download the digests from the artifacts
- name: Download digests
Expand Down Expand Up @@ -162,37 +157,20 @@ jobs:

# Get the tag name
- name: Get tag name
id: tag_event
if: github.event.inputs.tag == '' || github.event.inputs.tag == null
id: tag
uses: dawidd6/action-get-tag@v1
with:
strip_v: true

# Fallback to github.event.inputs.tag if tag is empty
- name: Fallback to github.event.inputs.tag if tag is empty
id: tag_input
if: github.event.inputs.tag != '' && github.event.inputs.tag != null
run: echo "::set-output name=tag::${{ github.event.inputs.tag }}"

# Select the tag to use
- name: Select the tag to use
id: tag
run: |
if [ -z "${{ steps.tag_event.outputs.tag }}" ]; then
echo "::set-output name=tag::${{ steps.tag_input.outputs.tag }}"
else
echo "::set-output name=tag::${{ steps.tag_event.outputs.tag }}"
fi
# Create manifest list and push
- name: Create manifest list and push to Registry
working-directory: /tmp/digests
run: |
docker buildx imagetools create \
--tag ${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} \
--tag ${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.get_version.outputs.version }} \
--tag ${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tag.outputs.tag }} \
--tag ${{ env.DH_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} \
--tag ${{ env.DH_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.get_version.outputs.version }} \
--tag ${{ env.DH_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tag.outputs.tag }} \
$(printf '${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *)
# Inspect image
Expand Down

0 comments on commit 6044747

Please sign in to comment.