Skip to content

Commit

Permalink
use shell as running base, rather than assign docker image
Browse files Browse the repository at this point in the history
[why] github action doesn't allow ${{ inputs.parameter }} under `image`
[how] revise to use `composite` mode rather than `docker` mode
  • Loading branch information
Falldog committed Apr 18, 2024
1 parent 189b79c commit d07410c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ inputs
* `app-path`: django app folder path. after `action/checkout`, the working dir would be repository root.
* default: `app`
* `docker-image`: docker image name. you are able to change the image hub to private source.
* default: `docker://hardcoretech/django-migration-checker`
* default: `hardcoretech/django-migration-checker`
* `docker-image-tag` docker image tag, it should represent version of `django-migration-checker` (python package)
* default: `latest`

Expand Down
16 changes: 11 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,20 @@ inputs:

docker-image:
description: 'docker image name'
default: 'docker://hardcoretech/django-migration-checker'
default: 'hardcoretech/django-migration-checker'

docker-image-tag:
description: 'docker image tag of django-migration-checker'
default: 'latest'

runs:
using: docker
image: "${{ inputs.docker-image }}:${{ inputs.docker-image-tag }}"
args:
- ${{ inputs.app-path }}
using: "composite"
steps:
- name: Run
shell: bash
run: |
docker run --rm \
--volume ${PWD}:/workspace \
--workdir /workspace \
${{ inputs.docker-image }}:${{ inputs.docker-image-tag }} \
${{ inputs.app-path }}

0 comments on commit d07410c

Please sign in to comment.