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

pin version for push-gha-metrics-action #25

Merged
merged 1 commit into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 1 addition & 2 deletions actions/ci-lint-charts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,10 @@ runs:
run: |
ct lint --config "${CHART_TESTING_CONFIG_PATH}" "${CHART_TESTING_EXTRA_ARGS}"


- name: Collect metrics
if: always()
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a
uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a # v2.0.2
with:
basic-auth: ${{ inputs.gc-basic-auth }}
hostname: ${{ inputs.gc-host }}
Expand Down
16 changes: 10 additions & 6 deletions actions/ci-lint-go/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@ runs:
- name: Configure github token
if: inputs.use-gati == 'true'
shell: bash
run: git config --global url."https://x-access-token:${{ steps.get-gh-token.outputs.access-token }}@github.com/".insteadOf "https://github.com/"
run:
git config --global url."https://x-access-token:${{
steps.get-gh-token.outputs.access-token }}@github.com/".insteadOf
"https://github.com/"

- name: Set env from files
if: inputs.use-env-files == 'true'
Expand All @@ -119,17 +122,18 @@ runs:
with:
# We already cache these directories in setup-go if we have
# use-go-cache set to true
skip-pkg-cache: ${{ inputs.use-go-cache }}
skip-build-cache: ${{ inputs.use-go-cache }}
skip-pkg-cache: ${{ inputs.use-go-cache }}
skip-build-cache: ${{ inputs.use-go-cache }}

version: ${{ inputs.golangci-lint-version }}
args: ${{ inputs.golangci-lint-args }}


- name: Print lint report artifact
if: always()
shell: bash
run: (test -f golangci-lint-report.xml && cat golangci-lint-report.xml) || true
run:
(test -f golangci-lint-report.xml && cat golangci-lint-report.xml) ||
true

- name: Store lint report artifact
if: always()
Expand All @@ -141,7 +145,7 @@ runs:
- name: Collect metrics
if: always()
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a
uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a # v2.0.2
with:
basic-auth: ${{ inputs.gc-basic-auth }}
hostname: ${{ inputs.gc-host }}
Expand Down
2 changes: 1 addition & 1 deletion actions/ci-lint-misc/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ runs:
- name: Collect metrics
if: always()
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a
uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a # v2.0.2
with:
basic-auth: ${{ inputs.gc-basic-auth }}
hostname: ${{ inputs.gc-host }}
Expand Down
2 changes: 1 addition & 1 deletion actions/ci-lint-ts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ runs:
- name: Collect metrics
if: always()
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a
uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a # v2.0.2
with:
basic-auth: ${{ inputs.gc-basic-auth }}
hostname: ${{ inputs.gc-host }}
Expand Down
11 changes: 7 additions & 4 deletions actions/ci-sonarqube/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ inputs:
description: "sonarqube token"
required: false
sonar-host-url:
description:: "sonarqube host url"
description: "sonarqube host url"
required: false

runs:
Expand All @@ -50,16 +50,19 @@ runs:
uses: sonarsource/sonarqube-scan-action@69c1a75940dec6249b86dace6b630d3a2ae9d2a7 # v2.0.1
with:
args: >
-Dsonar.go.tests.reportPaths=${{ steps.sonarqube_report_paths.outputs.sonarqube_tests_report_paths }}
-Dsonar.go.coverage.reportPaths=${{ steps.sonarqube_report_paths.outputs.sonarqube_coverage_report_paths }}
-Dsonar.go.tests.reportPaths=${{
steps.sonarqube_report_paths.outputs.sonarqube_tests_report_paths }}
-Dsonar.go.coverage.reportPaths=${{
steps.sonarqube_report_paths.outputs.sonarqube_coverage_report_paths
}}
env:
SONAR_TOKEN: ${{ inputs.sonar-token }}
SONAR_HOST_URL: ${{ inputs.sonar-host-url }}

- name: Collect metrics
if: always()
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a
uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a # v2.0.2
with:
basic-auth: ${{ inputs.gc-basic-auth }}
hostname: ${{ inputs.gc-host }}
Expand Down
7 changes: 5 additions & 2 deletions actions/ci-test-go/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ runs:
- name: Configure github token
if: inputs.use-gati == 'true'
shell: bash
run: git config --global url."https://x-access-token:${{ steps.get-gh-token.outputs.access-token }}@github.com/".insteadOf "https://github.com/"
run:
git config --global url."https://x-access-token:${{
steps.get-gh-token.outputs.access-token }}@github.com/".insteadOf
"https://github.com/"

- name: Set env from files
if: inputs.use-env-files == 'true'
Expand Down Expand Up @@ -141,7 +144,7 @@ runs:
- name: Collect metrics
if: always()
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a
uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a # v2.0.2
with:
basic-auth: ${{ inputs.gc-basic-auth }}
hostname: ${{ inputs.gc-host }}
Expand Down
18 changes: 13 additions & 5 deletions actions/ci-test-sol/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ runs:
- name: Run build affected
if: inputs.check-only-affected == 'true'
shell: bash
run: pnpm run build:affected --base=${{ inputs.base-ref }} ${{ inputs.forge-build-args }}
run:
pnpm run build:affected --base=${{ inputs.base-ref }} ${{
inputs.forge-build-args }}

- name: Run test
if: inputs.check-only-affected != 'true'
Expand All @@ -105,7 +107,9 @@ runs:
- name: Run test affected
if: inputs.check-only-affected == 'true'
shell: bash
run: pnpm run test:affected --base=${{ inputs.base-ref }} ${{ inputs.forge-test-args }}
run:
pnpm run test:affected --base=${{ inputs.base-ref }} ${{
inputs.forge-test-args }}

- name: Run snapshot
if: inputs.check-only-affected != 'true'
Expand All @@ -115,7 +119,9 @@ runs:
- name: Run snapshot affected
if: inputs.check-only-affected == 'true'
shell: bash
run: pnpm run snapshot:affected --base=${{ inputs.base-ref }} ${{ inputs.forge-snapshot-args }}
run:
pnpm run snapshot:affected --base=${{ inputs.base-ref }} ${{
inputs.forge-snapshot-args }}

- name: Run coverage
if: inputs.check-only-affected != 'true'
Expand All @@ -125,12 +131,14 @@ runs:
- name: Run coverage affected
if: inputs.check-only-affected == 'true'
shell: bash
run: pnpm run coverage:affected --base=${{ inputs.base-ref }} ${{ inputs.forge-coverage-args }}
run:
pnpm run coverage:affected --base=${{ inputs.base-ref }} ${{
inputs.forge-coverage-args }}

- name: Collect metrics
if: always()
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a
uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a # v2.0.2
with:
basic-auth: ${{ inputs.gc-basic-auth }}
hostname: ${{ inputs.gc-host }}
Expand Down
2 changes: 1 addition & 1 deletion actions/ci-test-ts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ runs:
- name: Collect metrics
if: always()
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a
uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a # v2.0.2
with:
basic-auth: ${{ inputs.gc-basic-auth }}
hostname: ${{ inputs.gc-host }}
Expand Down
7 changes: 5 additions & 2 deletions actions/cicd-build-publish-artifacts-go/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,10 @@ runs:
- name: Configure github token
if: inputs.use-gati == 'true'
shell: bash
run: git config --global url."https://x-access-token:${{ steps.get-gh-token.outputs.access-token }}@github.com/".insteadOf "https://github.com/"
run:
git config --global url."https://x-access-token:${{
steps.get-gh-token.outputs.access-token }}@github.com/".insteadOf
"https://github.com/"

- name: Setup go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
Expand Down Expand Up @@ -212,7 +215,7 @@ runs:
- name: Collect metrics
if: always()
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a
uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a # v2.0.2
with:
basic-auth: ${{ inputs.gc-basic-auth }}
hostname: ${{ inputs.gc-host }}
Expand Down
10 changes: 7 additions & 3 deletions actions/cicd-build-publish-artifacts-ts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,19 @@ runs:
uses: svenstaro/upload-release-action@1beeb572c19a9242f4361f4cee78f8e0d9aec5df # v2.7.0
with:
repo_token: ${{ github.token }}
file: ${{ inputs.monorepo-release-dir }}/${{ inputs.monorepo-release-name }}/${{ inputs.release-assets }}
tag: ${{ inputs.monorepo-release-name }}@${{ inputs.monorepo-release-version }}
file:
${{ inputs.monorepo-release-dir }}/${{ inputs.monorepo-release-name
}}/${{ inputs.release-assets }}
tag:
${{ inputs.monorepo-release-name }}@${{
inputs.monorepo-release-version }}
overwrite: true
file_glob: true

- name: Collect metrics
if: always()
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a
uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a # v2.0.2
with:
basic-auth: ${{ inputs.gc-basic-auth }}
hostname: ${{ inputs.gc-host }}
Expand Down
2 changes: 1 addition & 1 deletion actions/cicd-build-publish-charts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ runs:
- name: Collect metrics
if: always()
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a
uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a # v2.0.2
with:
basic-auth: ${{ inputs.gc-basic-auth }}
hostname: ${{ inputs.gc-host }}
Expand Down
2 changes: 1 addition & 1 deletion actions/cicd-changesets/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ runs:
- name: Collect metrics
if: always()
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a
uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a # v2.0.2
with:
basic-auth: ${{ inputs.gc-basic-auth }}
hostname: ${{ inputs.gc-host }}
Expand Down
2 changes: 1 addition & 1 deletion actions/guard-from-missing-changesets/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ runs:
- name: Collect metrics
if: always()
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a
uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a # v2.0.2
with:
basic-auth: ${{ inputs.gc-basic-auth }}
hostname: ${{ inputs.gc-host }}
Expand Down
53 changes: 31 additions & 22 deletions actions/helm-version-bump-receiver/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ inputs:
app-release-name: 'mercury-server'
required: true
github-token:
description: The GITHUB_TOKEN for the workflow
required: false
default: ${{ github.token }}
description: The GITHUB_TOKEN for the workflow
required: false
default: ${{ github.token }}
helm-chart-repo:
description: |
Helm chart repo URL to use, either `sdlc` or `prod`.
Expand All @@ -39,9 +39,9 @@ inputs:
helm-chart-repo: $AWS_ACCOUNT_ID_SDLC.dkr.ecr.$AWS_REGION.amazonaws.com/infra-charts
required: true
helm-chart-repo-update:
description: 'Whether or not to update the helm chart repo.'
description: "Whether or not to update the helm chart repo."
required: true
default: 'false'
default: "false"
helm-chart-version:
description: |
Helm chart version to use for the helm chart bump.
Expand All @@ -50,24 +50,24 @@ inputs:
helm-chart-version: '0.0.1'
required: true
pr-base-branch:
description: 'Base branch to create PR against.'
description: "Base branch to create PR against."
required: true
default: 'main'
default: "main"
pr-labels:
description: |
Comma separated list of labels to add to the PR.
description: |
Comma separated list of labels to add to the PR.

Example:
pr-labels: 'preview-sand,do-not-merge'
required: true
Example:
pr-labels: 'preview-sand,do-not-merge'
required: true
pr-draft:
description: 'Whether or not to create the PR as a draft.'
description: "Whether or not to create the PR as a draft."
required: true
default: 'true'
default: "true"
release-type:
description: 'Used to append to the branch name and the PR title.'
description: "Used to append to the branch name and the PR title."
required: true
default: 'sandbox'
default: "sandbox"

outputs:
pr-number:
Expand All @@ -77,7 +77,7 @@ outputs:
description: PR URL
value: ${{ steps.create-pr.outputs.pull-request-url }}
pr-operation:
description: 'PR Operation, for ex: created, updated, closed'
description: "PR Operation, for ex: created, updated, closed"
value: ${{ steps.create-pr.outputs.pull-request-operation }}
pr-head-sha:
description: Commit SHA of the PR branch
Expand All @@ -102,7 +102,10 @@ runs:
AWS_ACCESS_KEY_ID: ""
AWS_SESSION_TOKEN: ""
with:
cmd: yq eval -i '.releases[] |= select(.name == "${{ inputs.app-release-name }}").version = "${{ inputs.helm-chart-version }}"' ${{ inputs.app-file-path-pattern }}
cmd:
yq eval -i '.releases[] |= select(.name == "${{
inputs.app-release-name }}").version = "${{ inputs.helm-chart-version
}}"' ${{ inputs.app-file-path-pattern }}

- name: Update helm chart repo
if: inputs.helm-chart-repo-update == 'true'
Expand All @@ -113,23 +116,29 @@ runs:
AWS_ACCESS_KEY_ID: ""
AWS_SESSION_TOKEN: ""
with:
cmd: yq eval -i '.repositories[] |= select(.name == "infra-charts").url = "${{ inputs.helm-chart-repo }}"' ${{ inputs.app-file-path-pattern }}
cmd:
yq eval -i '.repositories[] |= select(.name == "infra-charts").url =
"${{ inputs.helm-chart-repo }}"' ${{ inputs.app-file-path-pattern }}

- name: Create PR to deploy
id: create-pr
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5.0.2
with:
base: ${{ inputs.pr-base-branch }}
branch: auto/${{ inputs.app-release-name}}/helm-${{ inputs.helm-chart-version }}-${{ inputs.release-type }}
branch:
auto/${{ inputs.app-release-name}}/helm-${{ inputs.helm-chart-version
}}-${{ inputs.release-type }}
draft: ${{ inputs.pr-draft }}
labels: ${{ inputs.pr-labels }}
title: Bump Helm Chart to ${{ inputs.helm-chart-version }} for ${{ steps.get-filename-from-path.outputs.filename-path }}
title:
Bump Helm Chart to ${{ inputs.helm-chart-version }} for ${{
steps.get-filename-from-path.outputs.filename-path }}
token: ${{ inputs.github-token }}

- name: Collect metrics
if: always()
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a
uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a # v2.0.2
with:
basic-auth: ${{ inputs.gc-basic-auth }}
hostname: ${{ inputs.gc-host }}
Expand Down
7 changes: 5 additions & 2 deletions actions/setup-gap/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,15 @@ runs:
- name: Argocd login
if: inputs.use-argocd == 'true'
shell: bash
run: argocd login localhost:${{ inputs.proxy-port }}/primary --skip-test-tls --plaintext --grpc-web --username ${{ inputs.argocd-user }} --password ${{ inputs.argocd-pass }}
run:
argocd login localhost:${{ inputs.proxy-port }}/primary --skip-test-tls
--plaintext --grpc-web --username ${{ inputs.argocd-user }} --password
${{ inputs.argocd-pass }}

- name: Collect metrics
if: always()
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a
uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a # v2.0.2
with:
basic-auth: ${{ inputs.gc-basic-auth }}
hostname: ${{ inputs.gc-host }}
Expand Down
Loading