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

Migrate some secrets to vars #35

Merged
merged 13 commits into from
Nov 21, 2023
2 changes: 1 addition & 1 deletion .github/actions/lint-github-actions/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ runs:
run: |
sudo apt-get install -y shellcheck
echo "::add-matcher::$GITHUB_ACTION_PATH/actionlint-matcher.json"
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/v1.6.22/scripts/download-actionlint.bash)
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/v1.6.26/scripts/download-actionlint.bash)
./actionlint -color
shell: bash

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-product.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ jobs:
- name: retag images
uses: ./tmp/github-workflows/.github/actions/retag-image
with:
aws_role: ${{ secrets.DV_AWS_ECR_ROLE }}
aws_region: ${{ secrets.DV_AWS_REGION }}
aws_role: ${{ vars.DV_AWS_ECR_ROLE }}
aws_region: ${{ vars.DV_AWS_REGION }}
ecr_repositories: ${{ needs.prepare-build.outputs.ecr_repos }}
current_image_tag: ${{ needs.prepare-build.outputs.image_tag1 }}
additional_image_tag: ${{ needs.prepare-build.outputs.image_tag2 }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-push-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ jobs:
path: ./tmp/github-workflows
- uses: ./tmp/github-workflows/.github/actions/build-push-image
with:
aws_role: ${{ secrets.DV_AWS_ECR_ROLE }}
aws_region: ${{ secrets.DV_AWS_REGION }}
ecr_registry: ${{ secrets.DV_AWS_ECR_REGISTRY }}
aws_role: ${{ vars.DV_AWS_ECR_ROLE }}
aws_region: ${{ vars.DV_AWS_REGION }}
ecr_registry: ${{ vars.DV_AWS_ECR_REGISTRY }}
ecr_repository: ${{ inputs.ecr_repository || secrets.DV_ECR_REPOSITORY }}
docker_file: ${{ inputs.docker_file }}
current_directory: ${{ inputs.current_directory }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-push-helm-chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
path: ./tmp/github-workflows
- uses: ./tmp/github-workflows/.github/actions/build-push-helm-chart
with:
chart_repository_url: ${{ inputs.chart_repository_url || secrets.DV_CHARTMUSEUM_URL }}
chart_repository_url: ${{ inputs.chart_repository_url || vars.DV_CHARTMUSEUM_URL }}
chart_repository_username: ${{ secrets.DV_CHARTMUSEUM_USER }}
chart_repository_password: ${{ secrets.DV_CHARTMUSEUM_PASSWORD }}
current_directory: ${{ inputs.current_directory }}
12 changes: 6 additions & 6 deletions .github/workflows/build-single-product-part.yml
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,9 @@ jobs:
# checkout this workflow repository to get actions
- uses: ./tmp/github-workflows/.github/actions/build-push-image
with:
aws_role: ${{ secrets.DV_AWS_ECR_ROLE }}
aws_region: ${{ secrets.DV_AWS_REGION }}
ecr_registry: ${{ secrets.DV_AWS_ECR_REGISTRY }}
aws_role: ${{ vars.DV_AWS_ECR_ROLE }}
aws_region: ${{ vars.DV_AWS_REGION }}
ecr_registry: ${{ vars.DV_AWS_ECR_REGISTRY }}
ecr_repository: ${{ steps.get-parameters.outputs.ecr_repo }}
docker_file: ./tmp/${{ inputs.component }}/${{ steps.get-parameters.outputs.app }}/docker/Dockerfile
current_directory: ./tmp/${{ inputs.component }}/${{ steps.get-parameters.outputs.app }}
Expand All @@ -250,9 +250,9 @@ jobs:
id: get-ecr-scan-result
uses: ./tmp/github-workflows/.github/actions/get-ecr-scan-result
with:
aws_role: ${{ secrets.DV_AWS_ECR_ROLE }}
aws_region: ${{ secrets.DV_AWS_REGION }}
ecr_registry: ${{ secrets.DV_AWS_ECR_REGISTRY }}
aws_role: ${{ vars.DV_AWS_ECR_ROLE }}
aws_region: ${{ vars.DV_AWS_REGION }}
ecr_registry: ${{ vars.DV_AWS_ECR_REGISTRY }}
ecr_repository: ${{ steps.get-parameters.outputs.ecr_repo }}
image_tag: ${{ inputs.image_tag1 }}
- name: check scan results
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/build-workspace-product-part.yml
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,9 @@ jobs:
# checkout this workflow repository to get actions
- uses: ./tmp/github-workflows/.github/actions/build-push-image
with:
aws_role: ${{ secrets.DV_AWS_ECR_ROLE }}
aws_region: ${{ secrets.DV_AWS_REGION }}
ecr_registry: ${{ secrets.DV_AWS_ECR_REGISTRY }}
aws_role: ${{ vars.DV_AWS_ECR_ROLE }}
aws_region: ${{ vars.DV_AWS_REGION }}
ecr_registry: ${{ vars.DV_AWS_ECR_REGISTRY }}
ecr_repository: ${{ steps.get-parameters.outputs.ecr_repo }}
docker_file: ./tmp/${{ inputs.component }}/docker/Dockerfile
current_directory: ./tmp/${{ inputs.component }}
Expand All @@ -321,9 +321,9 @@ jobs:
id: get-ecr-scan-result
uses: ./tmp/github-workflows/.github/actions/get-ecr-scan-result
with:
aws_role: ${{ secrets.DV_AWS_ECR_ROLE }}
aws_region: ${{ secrets.DV_AWS_REGION }}
ecr_registry: ${{ secrets.DV_AWS_ECR_REGISTRY }}
aws_role: ${{ vars.DV_AWS_ECR_ROLE }}
aws_region: ${{ vars.DV_AWS_REGION }}
ecr_registry: ${{ vars.DV_AWS_ECR_REGISTRY }}
ecr_repository: ${{ steps.get-parameters.outputs.ecr_repo }}
image_tag: ${{ inputs.image_tag1 }}
- name: check scan results
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/deploy-product.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ jobs:
path: ./tmp/github-workflows
- uses: ./tmp/github-workflows/.github/actions/check-actor
with:
dv_devops: ${{ secrets.DV_DEVOPS }}
dv_qms: ${{ secrets.DV_QMS }}
dv_devops: ${{ vars.DV_DEVOPS }}
dv_qms: ${{ vars.DV_QMS }}
actor: ${{ github.actor }}
qms_are_allowed: "true"
- uses: ./tmp/github-workflows/.github/actions/get-product-parameters
Expand All @@ -90,9 +90,9 @@ jobs:
if: ${{ inputs.add_revision_as_tag == true }}
uses: aws-actions/configure-aws-credentials@v1.7.0
with:
role-to-assume: ${{ secrets.DV_AWS_ECR_ROLE }}
aws_role: ${{ secrets.DV_AWS_ECR_ROLE }}
aws-region: ${{ secrets.DV_AWS_REGION }}
role-to-assume: ${{ vars.DV_AWS_ECR_ROLE }}
aws_role: ${{ vars.DV_AWS_ECR_ROLE }}
aws-region: ${{ vars.DV_AWS_REGION }}
- name: Login to Amazon ECR
if: ${{ inputs.add_revision_as_tag == true }}
id: login-ecr
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
# Run Linter against code base #
################################
- name: Lint Code Base
uses: github/super-linter/slim@v4
uses: super-linter/super-linter/slim@v5
env:
VALIDATE_ALL_CODEBASE: false
VALIDATE_BASH: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-node-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
path: ./tmp/github-workflows
- uses: ./tmp/github-workflows/.github/actions/check-actor
with:
dv_devops: ${{ secrets.DV_DEVOPS }}
dv_devops: ${{ vars.DV_DEVOPS }}
actor: ${{ github.actor }}
qms_are_allowed: "false"
- uses: ./tmp/github-workflows/.github/actions/build-node
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
path: ./tmp/github-workflows
- uses: ./tmp/github-workflows/.github/actions/check-actor
with:
dv_devops: ${{ secrets.DV_DEVOPS }}
dv_devops: ${{ vars.DV_DEVOPS }}
actor: ${{ github.actor }}
qms_are_allowed: "false"
- uses: ./tmp/github-workflows/.github/actions/build-python
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
path: ./tmp/github-workflows
- uses: ./tmp/github-workflows/.github/actions/check-actor
with:
dv_devops: ${{ secrets.DV_DEVOPS }}
dv_devops: ${{ vars.DV_DEVOPS }}
actor: ${{ github.actor }}
qms_are_allowed: "false"
- uses: ./tmp/github-workflows/.github/actions/build-node
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
path: ./tmp/github-workflows
- uses: ./tmp/github-workflows/.github/actions/check-actor
with:
dv_devops: ${{ secrets.DV_DEVOPS }}
dv_devops: ${{ vars.DV_DEVOPS }}
actor: ${{ github.actor }}
qms_are_allowed: "false"
- uses: ./tmp/github-workflows/.github/actions/build-python
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-product.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ jobs:
path: ./tmp/github-workflows
- uses: ./tmp/github-workflows/.github/actions/check-actor
with:
dv_devops: ${{ secrets.DV_DEVOPS }}
dv_qms: ${{ secrets.DV_QMS }}
dv_devops: ${{ vars.DV_DEVOPS }}
dv_qms: ${{ vars.DV_QMS }}
actor: ${{ github.actor }}
qms_are_allowed: "true"
- name: read known repositories
Expand Down Expand Up @@ -194,7 +194,7 @@ jobs:
path: ./tmp/github-workflows
- uses: ./tmp/github-workflows/.github/actions/check-actor
with:
dv_devops: ${{ secrets.DV_DEVOPS }}
dv_devops: ${{ vars.DV_DEVOPS }}
actor: ${{ github.actor }}
qms_are_allowed: "false"
- name: get release version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
path: ./tmp/github-workflows
- uses: ./tmp/github-workflows/.github/actions/check-actor
with:
dv_devops: ${{ secrets.DV_DEVOPS }}
dv_devops: ${{ vars.DV_DEVOPS }}
actor: ${{ github.actor }}
qms_are_allowed: "false"
- name: read known repositories
Expand Down