Skip to content

Commit

Permalink
🔥 Remove explicit tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
flaxel committed Jun 2, 2023
1 parent 43c83f2 commit 20a4adb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 24 deletions.
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 }}
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

0 comments on commit 20a4adb

Please sign in to comment.