Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: constants pr workflow to keep all steps under the same job #1834

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions .github/workflows/raise-pr-for-constants.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ env:
DEST_PATH: packages/analytics-js-common/src/constants/integrations/Destinations.ts

jobs:
check_changes:
check_changes_and_raise_pr:
runs-on: ubuntu-latest
outputs:
pr_required: ${{ steps.compare_files.outputs.pr_required }}
steps:
- name: Checkout Source Repo
uses: actions/checkout@v4
Expand Down Expand Up @@ -46,12 +44,8 @@ jobs:
echo "pr_required=true" >> $GITHUB_OUTPUT
fi

raise_pr:
needs: check_changes
if: needs.check_changes.outputs.pr_required == 'true'
runs-on: ubuntu-latest
steps:
- name: Commit and Push Changes
if: steps.compare_files.outputs.pr_required == 'true'
run: |
cd dest-repo
cp "../generated/Destinations.ts" "packages/analytics-js-common/src/constants/integrations/Destinations.ts"
Expand All @@ -60,6 +54,7 @@ jobs:
git push origin ${{ env.BRANCH_NAME }}

- name: Create or Update PR
if: steps.compare_files.outputs.pr_required == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand Down
Loading