Skip to content

Commit d4ac7d9

Browse files
authored
Update action.yml
1 parent 747f063 commit d4ac7d9

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

action.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ inputs:
99
default-branch:
1010
description: 'The default branch or target branch of a Pull request: Defaults to github.base_ref'
1111
required: false
12+
default: ${{ github.base_ref }}
1213
force-update:
1314
description: 'Force update the target branch locally when git fetch fails.'
1415
required: false
1516

1617
runs:
1718
using: 'composite'
1819
steps:
19-
- name: Get branch name
20-
id: branch-name
21-
uses: tj-actions/[email protected]
2220
- id: migration-fixer
2321
run: |
22+
BRANCH="${{ inputs.default-branch }}"
23+
2424
pip install django-migration-fixer==1.0.0
2525
2626
EXTRA_ARGS="--fix"
@@ -29,11 +29,7 @@ runs:
2929
EXTRA_ARGS+=" -f"
3030
fi
3131
32-
if [[ -z "${{ inputs.default-branch }}" ]]; then
33-
BRANCH="${{ steps.branch-name.outputs.base_ref_branch }}"
34-
fi
35-
36-
python ${{ inputs.managepy-path }} $EXTRA_ARGS -b "$BRANCH"
32+
python ${{ inputs.managepy-path }} $EXTRA_ARGS -b "${BRANCH/refs\/heads\//}"
3733
shell: bash
3834
branding:
3935
icon: check

0 commit comments

Comments
 (0)