forked from foundation-model-stack/fms-hf-tuning
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Rishab Prasad
committed
Sep 11, 2024
1 parent
dc84c18
commit b52f9cf
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Push Upstream Tag | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag_name: | ||
description: 'Upstream Tag Name' | ||
required: true | ||
|
||
jobs: | ||
push-upstream-tag: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Generate github-app token | ||
id: app-token | ||
uses: getsentry/action-github-app-token@v2 | ||
with: | ||
app_id: ${{ secrets.DEVOPS_APP_ID }} | ||
private_key: ${{ secrets.DEVOPS_APP_PRIVATE_KEY }} | ||
|
||
- name: Push Tag | ||
env: | ||
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} | ||
run: |~ | ||
git clone "https://github.com/foundation-model-stack/fms-hf-tuning.git" upstream | ||
cd upstream | ||
git fetch --tags | ||
git checkout tags/${{ github.event.inputs.tag_name }} | ||
git checkout -b add-tekton-files | ||
git tag -d ${{ github.event.inputs.tag_name }} | ||
cp -r ../fms-hf-tuning/.tekton ./.tekton | ||
git add .tekton/ | ||
git commit -m "add tekton files" | ||
git tag ${{ github.event.inputs.tag_name }} | ||
git config user.name "${GITHUB_ACTOR}" | ||
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | ||
git config --local user.password ${GITHUB_TOKEN} | ||
git remote add fork "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" | ||
git push fork ${{ github.event.inputs.tag_name }} |