Skip to content

Commit

Permalink
correct checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonioVentilii committed Nov 27, 2024
1 parent b039fba commit c4d4274
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 deletions.
3 changes: 0 additions & 3 deletions .github/actions/oisy-backend/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ outputs: {}
runs:
using: "composite"
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Cache backend canister WASM
uses: actions/cache@v4
id: backend-wasm-cache
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/binding-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,23 @@ on:
jobs:
generate:
runs-on: ubuntu-24.04

steps:

- name: Check if commits can be added
id: check_can_add_commit
run: |
echo "can_add_commit=${{ secrets.GIX_CREATE_PR_PAT != '' && github.event_name == 'pull_request' }}" >> $GITHUB_OUTPUT
- name: Checkout code
if: steps.check_can_add_commit.outputs.can_add_commit == 'true'
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.GIX_CREATE_PR_PAT }}

- name: Checkout code
if: steps.check_can_add_commit.outputs.can_add_commit == 'false'
uses: actions/checkout@v4

- uses: dorny/paths-filter@v3
Expand Down Expand Up @@ -72,20 +86,6 @@ jobs:
echo "changes_detected=false" >> $GITHUB_OUTPUT
fi
- name: Check if commits can be added
id: check_can_add_commit
if: steps.changes.outputs.src == 'true'
run: |
echo "can_add_commit=${{ secrets.GIX_CREATE_PR_PAT != '' && github.event_name == 'pull_request' }}" >> $GITHUB_OUTPUT
- name: Checkout code to commit
if: steps.changes.outputs.src == 'true' && steps.check_can_add_commit.outputs.can_add_commit == 'true'
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.GIX_CREATE_PR_PAT }}

- name: Commit bindings
if: steps.changes.outputs.src == 'true' && steps.check_can_add_commit.outputs.can_add_commit == 'true' && steps.check_changes.outputs.changes_detected == 'true'
uses: EndBug/add-and-commit@v9
Expand Down

0 comments on commit c4d4274

Please sign in to comment.