You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is is possible to use repository secrets whilst not referring to them directly in the action file? For a specific use case I am storing docker build-args in a .env file
which I try to dynamically load in pass to Docker, however the secrets are not being interpolated, is this even possible to achieve without manually referencing the secrets?
name: Build and push a Docker image
description: Builds and pushes a Docker image of the given app (inside apps/).
inputs:
app:
description: The name of the app to push, should match the folder name in apps/
required: true
runs:
using: "composite"
steps:
- uses: actions/checkout@v3
- id: build-args
run: |
# Read and format the .env file into Docker build arguments
echo "BUILD_ARGS=$(cat ./.github/configs/production/build-args/${{ inputs.app }}.env | sed 's/^/--build-arg /' | tr '\n' ' ')" >> $GITHUB_ENV
shell: bash
- run: "${{ format(env.BUILD_ARGS) }}"
shell: sh
ActionsBuild, test, and automate your deployment pipeline with world-class CI/CDQuestion
1 participant
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Select Topic Area
Question
Body
Is is possible to use repository secrets whilst not referring to them directly in the action file? For a specific use case I am storing docker build-args in a .env file
which I try to dynamically load in pass to Docker, however the secrets are not being interpolated, is this even possible to achieve without manually referencing the secrets?
Beta Was this translation helpful? Give feedback.
All reactions