Skip to content

Commit

Permalink
build: add unified workflow to publish both prod and integration imag…
Browse files Browse the repository at this point in the history
…es (#178)

Signed-off-by: Luis Mastrangelo <[email protected]>
  • Loading branch information
acuarica committed May 29, 2024
1 parent 9810d77 commit 5445414
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 78 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
name: Release Integration Environment
name: Publish Images to GitHub Registry

on:
push:
branches: [ main ]
workflow_dispatch:
inputs:
version:
description: "Release tag:"
type: string
required: true
push:
# `main` tag is used for integration environment
branches: [ main ]
# `v*` tags are used for production environment
tags: [ v* ]
# Manual trigger with custom release tag
workflow_dispatch:
inputs:
version:
description: "Release tag:"
type: string
required: true

env:
OWNER: hashgraph
Expand Down Expand Up @@ -36,6 +40,8 @@ jobs:
run: |
if [[ "${{ github.event.inputs.version }}" ]]; then
echo "TAG=${{ github.event.inputs.version }}" >> $GITHUB_ENV
elif [[ "$GITHUB_REF_TYPE" == "tag" ]]; then
echo "TAG=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
else
echo "TAG=main" >> $GITHUB_ENV
fi
Expand Down
69 changes: 0 additions & 69 deletions .github/workflows/release-image-to-github.yaml

This file was deleted.

0 comments on commit 5445414

Please sign in to comment.