Failed on "google-github-actions/get-secretmanager-secrets"
Since the version 1.6.27, the actionlint failed on the following correct workflow configuration:
name: test
on:
push
jobs:
job_id:
runs-on: ubuntu-latest
steps:
- id: 'secrets'
uses: 'google-github-actions/get-secretmanager-secrets@v2'
with:
secrets: |-
token:my-project/docker-registry-token
# other step
- id: 'publish'
uses: 'foo/bar@v1'
env:
TOKEN: '${{ steps.secrets.outputs.token }}'
📓 This workflow configuration is an example based on https://github.com/google-github-actions/get-secretmanager-secrets?tab=readme-ov-file#outputs
➜ actionlint test.yml
test.yml:21:21: property "token" is not defined in object type {} [expression]
|
21 | TOKEN: '${{ steps.secrets.outputs.token }}'
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
➜ actionlint --version
1.6.27
installed by building from source
built with go1.22.0 compiler for darwin/arm64
I confirmed that 1.6.26 works without error as expected.
This is because the action does not define the output in the manifest. I'll make a pull request there.
https://github.com/google-github-actions/get-secretmanager-secrets/blob/main/action.yml
Created: https://github.com/google-github-actions/get-secretmanager-secrets/pull/283
@rhysd Thank you for the comment and for creating the pull request.
However, the google-github-actions/get-secretmanager-secrets creates the outputs dynamically from the secrets attribute.
For example, the following configuration creates foo1 and bar2 outputs dynamically.
- id: 'secrets'
uses: 'google-github-actions/get-secretmanager-secrets@v2'
with:
secrets: |-
foo1:xxx
bar2:xxx
# The dynamic outputs can be used in other steps
# ${{ steps.secrets.outputs.foo1 }}
# ${{ steps.secrets.outputs.bar2 }}
Do you have any idea to support that on actionlint?
Ah, I see. Then it is not possible to know what output names are used statically.
Thank you for the comment and for making the change!
I'm looking forward to the next release with the change. Do you have a plan to release it soon?
Thank you!
Currently not planned. But I understand that I should make releases more frequently. Meanwhile, would you ignore the error by -ignore or use the latest main branch?
Thank you for the comment, and sorry for the late reply.
Currently not planned. But I understand that I should make releases more frequently.
I see. No problem, take your time 👍
Meanwhile, would you ignore the error by
-ignoreor use the latest main branch?
I got it. It's not urgent for me, and I will try either way you suggested if necessary.
Thank you for working on the great product. I appreciate that 👍