IMPORTANT: Only Docker base action can be convert and GitHub Action outputs
are not convertible.
-
Found action on GitHub Marketplace;
-
Go to the repository and search for
action.yml
; -
runs
key must be using'docker'
:runs: using: "docker" image: "Dockerfile"
-
Looks for
inputs
key, GitHub convert each input in uppercase and addINPUT_
at the beginning:inputs: my_input: description: "My Input variable"
- my_input + INPUT_MY_INPUT
-
If the action use
env
instead ofwith
, you don't have to convert the input name:- name: My Action uses: toumoro/my-action@v1 - with: - my_input: 'Some Value' + env: + MY_INPUT: 'Some Value'
-
Go to the DockerHub repository of the action to choose your tag.
-
To use docker instead of action in GitHub replace the
uses
with the docker image and don't usewith
key:- name: My Action - uses: yourdockeraccount/my-action@v1 + uses: docker://yourdockeraccount/my-action:latest env: MY_INPUT: 'Some Value'
my_job:
stage: my_stage
image: yourdockeraccount/my-action:latest
script: ["true"]
variables:
MY_INPUT: "Some Value"
my_job:
stage: my_stage
image: yourdockeraccount/my-action:latest
script: ["true"]
variables:
INPUT_MY_INPUT: "Some Value"
pipelines:
default:
- step:
name: My Action
script:
- pipe: docker://yourdockeraccount/my-action:latest
variables:
MY_INPUT: "Some Value"
pipelines:
default:
- step:
name: My Action
script:
- pipe: docker://yourdockeraccount/my-action:latest
variables:
INPUT_MY_INPUT: "Some Value"