Skip to content

Commit d747a36

Browse files
committed
Refactor authentication inputs in action.yml and README.md
- Renamed 'registry-token' to 'registry-password' for clarity and consistency. - Marked 'registry-token' as deprecated with a clear message to use 'registry-password' instead. - Updated README examples to reflect the new input naming and deprecation notice.
1 parent aaa04ce commit d747a36

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
ssh_remote_hostname: "${{ secrets.SSH_REMOTE_HOSTNAME }}"
4343
registry: "ghcr.io"
4444
registry-username: "${{ github.actor }}"
45-
registry-token: "${{ secrets.GITHUB_TOKEN }}"
45+
registry-password: "${{ secrets.GITHUB_TOKEN }}"
4646
stack_name: "${{ env.PROJECT_NAME }}"
4747
md5_file_path: "./.infrastructure/conf/traefik/prod/traefik.yml"
4848
md5_variable_name: "SPIN_MD5_HASH_TRAEFIK_YML"
@@ -60,8 +60,9 @@ The following inputs are available:
6060
| md5_file_path | Set the path to the file you would like to get the MD5 checksum for. | | false |
6161
| md5_variable_name | Set the name of the variable to store the MD5 checksum in. | `MD5_CHECKSUM` | false |
6262
| registry | Comma-separated list of container registries to authenticate with (e.g., "docker.io,ghcr.io"). | `docker.io` | false |
63-
| registry-token | The token or password to use to authenticate with the container registry. | | ⚠️ true |
63+
| registry-password | The password to use to authenticate with the container registry. | | ⚠️ true |
6464
| registry-username | The username to use to authenticate with the container registry. | | ⚠️ true |
65+
| ~~registry-token~~ | ⚠️ **DEPRECATED:** Use `registry-password` instead. | | false |
6566
| ssh_deploy_private_key | The private key you have authenticated to connect to your server via SSH. | | ⚠️ true |
6667
| ssh_deploy_user | The user that you would like to connect as on the remote server via SSH. | `deploy` | ⚠️ true |
6768
| ssh_remote_hostname | The hostname or IP address of the server you want to connect to. | | ⚠️ true |
@@ -121,7 +122,7 @@ To ensure you're validating the identity of your server, you can set the `ssh_re
121122
```yml
122123
- uses: serversideup/github-action-docker-swarm-deploy@v3
123124
with:
124-
registry-token: "${{ secrets.GITHUB_TOKEN }}"
125+
registry-password: "${{ secrets.GITHUB_TOKEN }}"
125126
registry-username: "${{ github.actor }}"
126127
ssh_deploy_private_key: "${{ secrets.SSH_DEPLOY_PRIVATE_KEY }}"
127128
ssh_remote_hostname: "${{ secrets.SSH_REMOTE_HOSTNAME }}"

action.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,13 @@ inputs:
4141
registry-username:
4242
description: 'The username to use to authenticate with the container registry.'
4343
required: true
44-
registry-token:
45-
description: 'The token or password to use to authenticate with the container registry.'
44+
registry-password:
45+
description: 'The password to use to authenticate with the container registry.'
4646
required: true
47+
registry-token:
48+
description: '⚠️ DEPRECATED: Use registry-password instead. The token or password to use to authenticate with the container registry.'
49+
required: false
50+
deprecationMessage: 'registry-token is deprecated. Please use registry-password instead.'
4751
log_level:
4852
description: 'The log level to use for the Docker CLI.'
4953
default: 'debug'
@@ -182,7 +186,7 @@ runs:
182186
uses: docker/login-action@v3
183187
with:
184188
username: ${{ inputs.registry-username }}
185-
password: ${{ inputs.registry-token }}
189+
password: ${{ inputs.registry-password || inputs.registry-token }}
186190
registry: ${{ inputs.registry }}
187191

188192
- name: Load .env file and set variables

0 commit comments

Comments
 (0)