Skip to content

Commit

Permalink
Testing...
Browse files Browse the repository at this point in the history
  • Loading branch information
spaceo committed May 21, 2024
1 parent 90114fc commit 6d04e2a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/create-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,16 @@ jobs:
if: ${{ github.event.action == 'create_pr' && github.event.client_payload.branch && github.event.client_payload.build_url && github.event.client_payload.dependency_package }}

- id: check_branch_exists
uses: GuillaumeFalourd/branch-exists@v1
with:
branch: ${{ env.PR_BRANCH }}
if: ${{ env.PR_BRANCH }}

- uses: actions/checkout@v4
with:
fetch-depth: 0
if: ${{ env.PR_BRANCH && env.BUILD_URL }}
if: ${{ steps.check_branch_exists.outputs.exists == 'false' }}

- name: Insert dependency
uses: Wandalen/wretry.action@master
Expand All @@ -43,7 +49,7 @@ jobs:
composer remove ${{ env.PACKAGE }} \
&& composer require ${{ env.PACKAGE }}
attempt_limit: 200
if: ${{ env.BUILD_URL && env.PACKAGE && env.BUILD_URL_IS_ACCEPTED == 'true' }}
if: ${{ steps.check_branch_exists.outputs.exists == 'false' && env.BUILD_URL && env.PACKAGE && env.BUILD_URL_IS_ACCEPTED == 'true' }}

- name: Create branch and PR
id: create_pr
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ jobs:
name: Test
runs-on: ubuntu-latest
steps:
- id: check-branch-exists
uses: GuillaumeFalourd/branch-exists@v1
with:
branch: humourless-satisfactory-copperbutterfly

- name: Testing
run: |
BRANCH_EXISTS=$(git fetch origin develop || echo "John")
echo "$BRANCH_EXISTS"
# echo "BUILD_URL_IS_ACCEPTED=$BUILD_URL_IS_ACCEPTED" >> $GITHUB_ENV
- name: Testing II
run: |
echo "Hello"
- if: steps.check-branch-exists.outputs.exists == 'true'
run: echo 'humourless-satisfactory-copperbutterfly Branch exists'

- if: steps.check-branch-exists.outputs.exists == 'false'
run: echo 'humourless-satisfactory-copperbutterfly Branch NOT FOUND'

0 comments on commit 6d04e2a

Please sign in to comment.