Skip to content

Commit bea0739

Browse files
authored
fix: Fix GH Action workflow (#1)
1 parent c4bba77 commit bea0739

File tree

4 files changed

+11
-31
lines changed

4 files changed

+11
-31
lines changed

.github/workflows/test_action.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ name: Test Action
22
on:
33
pull_request:
44
branches: ["main"]
5-
push:
6-
branches: ["main"]
75

86
jobs:
97
check-pr-is-updated:
@@ -13,6 +11,8 @@ jobs:
1311
steps:
1412
- name: Checkout
1513
uses: actions/checkout@v3
14+
with:
15+
fetch-depth: 0
1616

1717
- name: 'check if the PR branch is updated or not'
1818
id: check_pr_is_updated

Dockerfile

Lines changed: 0 additions & 14 deletions
This file was deleted.

action.yaml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ inputs:
66
remote_branch:
77
description: 'Remote branch (e.g.: upstream/main)'
88
required: true
9-
default: 'upstream/main'
109
pr_sha:
1110
description: 'PR SHA'
1211
required: true
@@ -16,8 +15,12 @@ branding:
1615
color: green
1716

1817
runs:
19-
using: 'docker'
20-
image: 'Dockerfile'
21-
args:
22-
- ${{ inputs.remote_branch }}
23-
- ${{ inputs.pr_sha }}
18+
using: 'composite'
19+
steps:
20+
- name: check if the PR branch is updated
21+
shell: bash
22+
run: |
23+
if ! git merge-base --is-ancestor ${{ inputs.remote_branch }} ${{ inputs.pr_sha }}; then
24+
echo "This branch is not up to date with ${{ inputs.remote_branch }}";
25+
exit 1;
26+
fi

entrypoint.sh

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)