Skip to content
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

🔥 Remove explicit tokens #122

Merged
merged 4 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 6 additions & 16 deletions .github/workflows/template_gitops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,18 @@ on:
gitops-prod:
required: false
type: string
# waiting for: https://github.com/github-community/community/discussions/17554
secrets:
docker-username:
required: false
docker-password:
required: false
gitops-token:
required: false
npm-token:
required: false
goproxy:
required: false
gonosumdb:
required: false
docker-build-secrets:
required: false
docker-build-secret-files:
required: false
gitops-token:
required: false

jobs:
gitops:
Expand All @@ -61,18 +56,13 @@ jobs:
with:
docker-username: ${{ secrets.docker-username }}
docker-password: ${{ secrets.docker-password }}
# remove npm token, goproxy, gonosumdb if feature is available: https://github.com/github-community/community/discussions/17554
docker-build-args: |
${{ inputs.docker-build-args }}
NPM_TOKEN=${{ secrets.npm-token }}
GOPROXY=${{ secrets.goproxy }}
GONOSUMDB=${{ secrets.gonosumdb }}
flaxel marked this conversation as resolved.
Show resolved Hide resolved
docker-build-args: ${{ inputs.docker-build-args }}
docker-build-target: ${{ inputs.docker-build-target }}
docker-build-secrets: ${{ secrets.docker-build-secrets }}
docker-build-secret-files: ${{ secrets.docker-build-secret-files }}
docker-file: ${{ inputs.docker-file }}
docker-image: ${{ inputs.docker-image }}
gitops-token: ${{ secrets.gitops-token }}
gitops-dev: ${{ inputs.gitops-dev }}
gitops-stage: ${{ inputs.gitops-stage }}
gitops-prod: ${{ inputs.gitops-prod }}
docker-build-secrets: ${{ secrets.docker-build-secrets }}
docker-build-secret-files: ${{ secrets.docker-build-secret-files }}
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,24 +95,18 @@ jobs:
gitops-prod: |-
your files
secrets:
# optional: token to access the repository
gitops-token: ${{ <your-gitops-token> }}
# optional: username for the docker registry
docker-username: ${{ <your-docker-username> }}
# optional: password for the docker registry
docker-password: ${{ <your-docker-password> }}
# optional: token to pull private npm packages
npm-token: ${{ <your-npm-token> }}
# optional: goproxy environment variable
goproxy: ${{ <your-goproxy> }}
# optional: gonosumdb environment variable
gonosumdb: ${{ <your-gonosumdb> }}
# optional: list of secrets to expose to the build (e.g., key=string, GIT_AUTH_TOKEN=mytoken)
docker-build-secrets: |
"${{ <your-secrets> }}"
# optional: list of secret files to expose to the build (e.g., key=filename, MY_SECRET=./secret.txt)
docker-build-secret-files: |
"${{ <your-secret-files> }}"
# optional: token to access the repository
gitops-token: ${{ <your-gitops-token> }}
```
</details>

Expand Down