Skip to content

Commit

Permalink
fix: Fix GH Action workflow (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
xmnlab authored Aug 4, 2023
1 parent c4bba77 commit bea0739
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 31 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test_action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: Test Action
on:
pull_request:
branches: ["main"]
push:
branches: ["main"]

jobs:
check-pr-is-updated:
Expand All @@ -13,6 +11,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: 'check if the PR branch is updated or not'
id: check_pr_is_updated
Expand Down
14 changes: 0 additions & 14 deletions Dockerfile

This file was deleted.

15 changes: 9 additions & 6 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ inputs:
remote_branch:
description: 'Remote branch (e.g.: upstream/main)'
required: true
default: 'upstream/main'
pr_sha:
description: 'PR SHA'
required: true
Expand All @@ -16,8 +15,12 @@ branding:
color: green

runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.remote_branch }}
- ${{ inputs.pr_sha }}
using: 'composite'
steps:
- name: check if the PR branch is updated
shell: bash
run: |
if ! git merge-base --is-ancestor ${{ inputs.remote_branch }} ${{ inputs.pr_sha }}; then
echo "This branch is not up to date with ${{ inputs.remote_branch }}";
exit 1;
fi
9 changes: 0 additions & 9 deletions entrypoint.sh

This file was deleted.

0 comments on commit bea0739

Please sign in to comment.