Skip to content

Commit

Permalink
manually set PR number for testing action
Browse files Browse the repository at this point in the history
  • Loading branch information
Julesssss committed Jul 12, 2024
2 parents d22b0a5 + 1048f9a commit 55a4168
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/testBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ name: Build and deploy apps for testing

on:
workflow_dispatch:
inputs:
PULL_REQUEST_NUMBER: 45332
description: Pull Request number for correct placement of apps
required: true
pull_request_target:
types: [opened, synchronize, labeled]
branches: ['*ci-test/**']
Expand All @@ -30,12 +26,12 @@ jobs:
- id: hasReadyToBuildLabel
name: Set HAS_READY_TO_BUILD_LABEL flag
run: |
echo "HAS_READY_TO_BUILD_LABEL=$(gh pr view "${{ env.PULL_REQUEST_NUMBER }}" --repo Expensify/App --json labels --jq '.labels[].name' | grep -q 'Ready To Build' && echo 'true')" >> "$GITHUB_OUTPUT"
echo "HAS_READY_TO_BUILD_LABEL=$(gh pr view 45332 --repo Expensify/App --json labels --jq '.labels[].name' | grep -q 'Ready To Build' && echo 'true')" >> "$GITHUB_OUTPUT"
if [[ "$HAS_READY_TO_BUILD_LABEL" != 'true' ]]; then
echo "The 'Ready to Build' label is not attached to the PR #${{ env.PULL_REQUEST_NUMBER }}"
echo "The 'Ready to Build' label is not attached to the PR"
fi
env:
PULL_REQUEST_NUMBER: ${{ github.event.number || github.event.inputs.PULL_REQUEST_NUMBER }}
PULL_REQUEST_NUMBER: 45332
GITHUB_TOKEN: ${{ github.token }}

getBranchRef:
Expand All @@ -54,7 +50,7 @@ jobs:
id: getHeadRef
run: |
set -e
gh pr checkout ${{ github.event.inputs.PULL_REQUEST_NUMBER }}
gh pr checkout 45332
echo "REF=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -65,7 +61,7 @@ jobs:
if: ${{ fromJSON(needs.validateActor.outputs.READY_TO_BUILD) }}
runs-on: ubuntu-latest-xl
env:
PULL_REQUEST_NUMBER: ${{ github.event.number || github.event.inputs.PULL_REQUEST_NUMBER }}
PULL_REQUEST_NUMBER: 45332
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -76,7 +72,7 @@ jobs:
run: |
cp .env.staging .env.adhoc
sed -i 's/ENVIRONMENT=staging/ENVIRONMENT=adhoc/' .env.adhoc
echo "PULL_REQUEST_NUMBER=$PULL_REQUEST_NUMBER" >> .env.adhoc
echo "PULL_REQUEST_NUMBER=45332" >> .env.adhoc
- name: Setup Node
uses: ./.github/actions/composite/setupNode
Expand Down

0 comments on commit 55a4168

Please sign in to comment.