Skip to content

Commit

Permalink
ci: enhanced publish 2 zoo action
Browse files Browse the repository at this point in the history
  • Loading branch information
caviri committed Nov 14, 2024
1 parent 440a9e0 commit e615dfd
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/push_odtpyml_to_zoo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Push ODTP YAML to Zoo

on:
workflow_dispatch:

jobs:
fork_and_pr:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -30,7 +30,6 @@ jobs:
echo "Component Version: $component_version"
echo "component_name=$component_name" >> $GITHUB_ENV
echo "component_version=$component_version" >> $GITHUB_ENV
# Requires the yq command-line tool to parse YAML; install if not available
- name: Rename File
run: |
Expand All @@ -44,6 +43,14 @@ jobs:
ref: components # Checking out the components branch of the fork
path: forked-repo

- name: Set Upstream and Fetch Latest Changes from Original Repo
run: |
cd forked-repo
git remote add upstream https://github.com/${{ vars.UPSTREAM_REPO }}.git
git fetch upstream components
git merge upstream/components
# The above steps ensure that your fork's `components` branch is in sync with the latest changes from the original repo's `components` branch

- name: Copy Renamed File to Components Folder
run: |
mkdir -p forked-repo/components
Expand All @@ -66,4 +73,4 @@ jobs:
head: "${{ github.repository_owner }}:components" # Format for fork's branch
base: components
title: "Add component file: ${component_name}_${component_version}.yml"
body: "This PR adds the component file for ${component_name} version ${component_version}."
body: "This PR adds the component file for ${component_name} version ${component_version}."

0 comments on commit e615dfd

Please sign in to comment.