-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prototyping adding in a dynamic secrets.yaml
file from GitHub secrets
#95
base: main
Are you sure you want to change the base?
Conversation
uses: akiojin/[email protected] | ||
id: decode-base64 | ||
with: | ||
base64: ${{ secrets.ESPHOME_SECRETS_YAML }} | ||
output-path: ${{ inputs.secrets-yaml-file-path }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably don't need to import a whole action for this
uses: akiojin/[email protected] | |
id: decode-base64 | |
with: | |
base64: ${{ secrets.ESPHOME_SECRETS_YAML }} | |
output-path: ${{ inputs.secrets-yaml-file-path }} | |
id: decode-base64 | |
run: echo "${{ secrets.ESPHOME_SECRETS_YAML }}" | base64 -d > ${{ inputs.secrets-yaml-file-path }} |
secrets-yaml-file-path: | ||
description: Location of secrets.yaml file | ||
required: false | ||
type: string | ||
default: "secrets.yaml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we know the path of each yaml file that is going to be compiled, and secrets.yaml
needs to be in the same directory as that, we can just use $(dirname ${{ matrix.file }})/secrets.yaml
to stick it in the right place.
cache: | ||
description: Cache build directory | ||
required: false | ||
type: boolean | ||
default: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add this in a separate PR please
.gitignore
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Separate PR please
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
I found this and thought it was cool but stumbled on incorporating the
secrets.yaml
file and made this as a rough prototype.I'm currently using it in a private repo but I'd set up a public one as an example if there's an interest.
A rough example of a
.github/workflows/build.yaml
actions is below:I'd be interested in cleaning this up if it's useful. Or is there an easier way to go about this that I'm misunderstanding?