Questions tagged [github-secret]

55 questions
17
votes
1 answer

How to concatenate secrets into workflow action on GitHub?

I would like to concatenate multiple secrets into my workflow action on GitHub. The example that comes to mind would be to create a full path from folder to filename.
14
votes
3 answers

How do I get all GitHub secrets into env variables for Actions to access (powershell in my case)?

I read some similar posts but none seem to answer this question. I can set individual GitHub secrets into environment variables in an Action if I know the name of the secret: env: PW_ID0007: "${{secrets.PW_ID0007}}" How can I expose all secrets as…
5
votes
1 answer

GitHub Actions Passing Secret as Input for reusable workflow

I have a reusable workflow for building and pushing a docker image to ECR. One of the inputs of the workflow is for specifying arguments for the docker build command. This is the command in the reusable workflow: docker build -t…
Mickey Cohen
  • 997
  • 7
  • 23
5
votes
0 answers

How to read Github Secrets into application.properties without using Spring Boot?

I have a non Spring Boot Java application and want to store and read some secret keys using GitHub Secrets into my applications.properties file. I have Base64 encoded the values and stored them in GH Secrets, and now I am trying to access them like…
mr nooby noob
  • 1,860
  • 5
  • 33
  • 56
5
votes
2 answers

How to pass secrets from GitHub Actions to python environ variables?

To run pytest within GitHub Actions, I have to pass some secrets for Python running environ. e.g., - name: Test env vars for python run: python -c 'import os;print(os.environ)' env: TEST_ENV: 'hello world' TEST_SECRET: ${{…
northtree
  • 8,569
  • 11
  • 61
  • 80
4
votes
0 answers

How to protect GitHub secrets in pull request actions from malicious pull requests?

Let's say the integration tests I want to run on every pull requests require an external API authentication secret. See the following example: name: Pull Request Workflow on: pull_request: branches: - main jobs: build: runs-on:…
Ben Hirschberg
  • 1,410
  • 1
  • 12
  • 17
4
votes
2 answers

CI Tests fail on Dependabot pull requests

I have a GitHub action that runs tests in the CI on every pull request that is opened on my repo. As part of the tests workflow, the job checkout several other repositories in the GitHub organization (all of them are private, same as my repo). Later…
3
votes
0 answers

github action wrongly thinks output is a secret

I have a github action workflow job that has a couple of outputs that github is detecting as secrets by they are not at all. One is the first 7 chars of github.sha and the another is random UUID that I generate using uuidgen. These outputs are used…
chenny
  • 769
  • 2
  • 17
  • 44
3
votes
1 answer

How to use GitHub action secrets in a reusable workflow?

I have a number of GitHub actions that interact with Azure using the az command line, so I figured I'd try to write a reusable workflow to log into Azure. I have been following this guide:…
Claus Appel
  • 1,015
  • 10
  • 28
3
votes
2 answers

Output in reusable workflow is incorrectly recognized as secret (Github Actions)

I am using secrets in my reusable workflow and also have outputs. My output is a path, that has parts of AWS secrets, so I get an error Skip output 'file-url' since it may contain secret. aws-secret-access-key: ${{…
Polina_A
  • 31
  • 1
  • 2
3
votes
2 answers

How do you specify AWS credentials when running AWS CLI from a Dockerfile in an AWS SAM pipeline?

I have an app using: SAM AWS S3 AWS Lambda based on Docker AWS SAM pipeline Github function In the Dockerfile I have: RUN aws s3 cp s3://mylambda/distilBERT distilBERT.tar.gz Resulting in the error message: Step 6/8 : RUN aws s3 cp…
Xiiryo
  • 3,021
  • 5
  • 31
  • 48
3
votes
1 answer

Github return empty string as secrets while running actions

When I do ${{ secrets.MY_SECRET }} it returns empty string, I am the person committing the changes and its my repository so there should be no issue regarding authorization of secrets, and also cloned it not fork, this is how my actions job looks…
Yugank Singh
  • 401
  • 6
  • 14
2
votes
2 answers

How to make GitHub Actions safely access Secrets for PRs created from forks?

I have a public repository that runs end-to-end tests. These tests require secrets that are stored in GitHub. The corresponding workflow yaml file has pull_request entry as follows: on: pull_request: .... Problem: If I (the owner) create a pull…
Sasha Shpota
  • 9,436
  • 14
  • 75
  • 148
2
votes
3 answers

How can I use GitHub secrets in a .npmrc file?

I have a project on GitHub that has several dependencies all of which are published on GitHub Package Registry. I use GitHub actions to publish my packages. I am able to use GitHub secrets in my workflow.yml file but not so in my .npmrc file. As…
2
votes
0 answers

How can I make GitHub Actions work with PRs made by external contributors?

My GitHub actions depend on some GitHub secrets that I set in my repo: CI works when I push a commit: https://github.com/paulrberg/prb-proxy/actions/runs/1958606928 But it fails when an external contributor makes a PR from their forked version of…
Paul Razvan Berg
  • 16,949
  • 9
  • 76
  • 114
1
2 3 4