Skip to content

Commit ac5087c

Browse files
committed
Inline setup action
Using relative paths in a composite action does not import the action file from the action repository, but from the original repository. To avoid having to hardcode a branch name or version number in the actions, the two steps are inlined instead.
1 parent a4e8a0a commit ac5087c

File tree

4 files changed

+28
-55
lines changed

4 files changed

+28
-55
lines changed

README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,3 @@ You can also supply multiple space-separated filenames to sign a list of files:
6969
artifactory_username: ${{ secrets.ARTIFACTORY_USER }}
7070
artifactory_password: ${{ secrets.ARTIFACTORY_PASSWORD }}
7171
```
72-
73-
### setup
74-
75-
The setup action is used by `git-sign` and `gpg-sign` to create an env file and
76-
sign in to artifactory. It can also be used standalone.

garasign/git-sign/action.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,22 @@ inputs:
2929
runs:
3030
using: composite
3131
steps:
32-
- name: Prepare garasign container
32+
- name: Create the envfile
3333
if: ${{ inputs.skip_setup == 'false' }}
34-
uses: ./.github/actions/garasign/setup
34+
run: |
35+
cat << EOF > envfile
36+
GRS_CONFIG_USER1_USERNAME=${{ inputs.garasign_username }}
37+
GRS_CONFIG_USER1_PASSWORD=${{ inputs.garasign_password }}
38+
EOF
39+
shell: bash
40+
41+
- name: Log in to artifactory
42+
if: ${{ inputs.skip_setup == 'false' }}
43+
uses: redhat-actions/podman-login@v1
3544
with:
36-
garasign_username: ${{ inputs.garasign_username }}
37-
garasign_password: ${{ inputs.garasign_password }}
38-
artifactory_username: ${{ inputs.artifactory_username }}
39-
artifactory_password: ${{ inputs.artifactory_password }}
40-
artifactory_registry: ${{ inputs.artifactory_registry }}
45+
username: ${{ inputs.artifactory_username }}
46+
password: ${{ inputs.artifactory_password }}
47+
registry: ${{ inputs.artifactory_registry }}
4148

4249
- name: "Run git command"
4350
run: |

garasign/gpg-sign/action.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,22 @@ inputs:
2929
runs:
3030
using: composite
3131
steps:
32-
- name: Prepare garasign container
32+
- name: Create the envfile
3333
if: ${{ inputs.skip_setup == 'false' }}
34-
uses: ./.github/actions/garasign/setup
34+
run: |
35+
cat << EOF > envfile
36+
GRS_CONFIG_USER1_USERNAME=${{ inputs.garasign_username }}
37+
GRS_CONFIG_USER1_PASSWORD=${{ inputs.garasign_password }}
38+
EOF
39+
shell: bash
40+
41+
- name: Log in to artifactory
42+
if: ${{ inputs.skip_setup == 'false' }}
43+
uses: redhat-actions/podman-login@v1
3544
with:
36-
garasign_username: ${{ inputs.garasign_username }}
37-
garasign_password: ${{ inputs.garasign_password }}
38-
artifactory_username: ${{ inputs.artifactory_username }}
39-
artifactory_password: ${{ inputs.artifactory_password }}
40-
artifactory_registry: ${{ inputs.artifactory_registry }}
45+
username: ${{ inputs.artifactory_username }}
46+
password: ${{ inputs.artifactory_password }}
47+
registry: ${{ inputs.artifactory_registry }}
4148

4249
- name: "Create detached signature for filename"
4350
run: |

garasign/setup/action.yml

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

0 commit comments

Comments
 (0)