Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Commit

Permalink
ci: update docker to add option for custom branch
Browse files Browse the repository at this point in the history
  • Loading branch information
nayyara-airlangga authored Aug 12, 2024
1 parent c87312f commit 77d6201
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/docker-build-push-dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ on:
- completed
# Allow running workflow manually from the Actions tab
workflow_dispatch:
inputs:
branch:
description: 'Branch to build on'
type: string
default: main
# Uncomment below to allow specific version workflow run
# inputs:
# version:
Expand Down Expand Up @@ -50,9 +55,15 @@ jobs:
- name: checkout
uses: actions/checkout@v4

- name: Git submodule update
- name: Fetch git repo
id: fetch-git
run: |
git submodule update --init
rm -rf calcom
mkdir calcom
cd calcom
BRANCH=${{ inputs.branch }}
git clone -b $BRANCH [email protected]:YouthCatalyst/calendar.git .
echo "git-branch=${BRANCH#RELEASE/}" >> "$GITHUB_OUTPUT"
- name: Log in to the Docker Hub registry
uses: docker/login-action@v3
Expand Down Expand Up @@ -80,6 +91,7 @@ jobs:
# Add flavor latest only on full releases, not on pre-releases
flavor: |
latest=${{ !github.event.release.prerelease }}
type=raw,value=${{ steps.fetch-git.outputs.git-branch }}
- name: Copy env
run: |
Expand Down

0 comments on commit 77d6201

Please sign in to comment.