Skip to content

Commit

Permalink
Merge pull request #589 from radixdlt/DO-2076-use-forked-gha
Browse files Browse the repository at this point in the history
  • Loading branch information
marek-karwacki-rdx authored Jan 1, 2024
2 parents 3d36d01 + 1c40783 commit 6b9b987
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 30 deletions.
4 changes: 2 additions & 2 deletions .github/actions/fetch-secrets/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ runs:
version: 2

- name: Configure AWS credentials to fetch secrets
uses: aws-actions/configure-aws-credentials@97271860067ec931c45b8d104fbf0d15954ab85c # branch v1-node16
uses: RDXWorks-actions/configure-aws-credentials@main
with:
role-to-assume: ${{ inputs.role_name }}
aws-region: ${{ inputs.region }}
role-session-name: ${{ inputs.app_name }}-${{ github.run_id }}-${{ github.run_attempt }}

- name: Fetch AWS secrets
uses: aws-actions/aws-secretsmanager-get-secrets@287592d14d9c9c48199db83dc182ae12af3df18e # v1.0.1
uses: RDXWorks-actions/aws-secretsmanager-get-secrets@main
with:
secret-ids: |
${{ inputs.secret_prefix }}, ${{ inputs.secret_name }}
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
contents: read
deployments: write
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
- uses: RDXWorks-actions/checkout@main
- uses: radixdlt/public-iac-resuable-artifacts/fetch-secrets@main
with:
role_name: ${{ secrets.AWS_ROLE_NAME_SNYK_SECRET }}
Expand All @@ -35,32 +35,32 @@ jobs:
secret_name: ${{ secrets.AWS_SECRET_NAME_SNYK }}
parse_json: true
- name: Setup .NET SDK
uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a
uses: RDXWorks-actions/setup-dotnet@main
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Install dependencies
run: dotnet restore
- name: Run Snyk to check for deps vulnerabilities
uses: snyk/actions/dotnet@b98d498629f1c368650224d6d212bf7dfa89e4bf # v0.4.0
uses: RDXWorks-actions/snyk-actions/dotnet@master
with:
args: --all-projects --org=${{ env.SNYK_SERVICES_ORG_ID }} --severity-threshold=critical
- name: Run Snyk to check for code vulnerabilities
uses: snyk/actions/dotnet@b98d498629f1c368650224d6d212bf7dfa89e4bf # v0.4.0
uses: RDXWorks-actions/snyk-actions/dotnet@master
with:
args: --all-projects --org=${{ env.SNYK_SERVICES_ORG_ID }} --severity-threshold=high
command: code test
- name: Generate SBOM # check SBOM can be generated but nothing is done with it
uses: snyk/actions/dotnet@b98d498629f1c368650224d6d212bf7dfa89e4bf # v0.4.0
uses: RDXWorks-actions/snyk-actions/dotnet@master
with:
args: --all-projects --org=${{ env.SNYK_SERVICES_ORG_ID }} --exclude=package.json --format=cyclonedx1.4+json --json-file-output sbom.json
command: sbom

build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
- uses: RDXWorks-actions/checkout@main
- name: Setup .NET SDK
uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a
uses: RDXWorks-actions/setup-dotnet@main
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Install dependencies
Expand All @@ -78,15 +78,15 @@ jobs:
data-aggregator-tag: ${{ steps.setup_tags.outputs.data-aggregator-tag }}
gateway-api-tag: ${{ steps.setup_tags.outputs.gateway-api-tag }}
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
- uses: RDXWorks-actions/checkout@main
- name: Setup tags for docker image
id: setup_tags
uses: ./.github/actions/set-variables
with:
github_event_name: ${{ github.event_name }}
github_action_name: ${{ github.event.action}}
- name: Publish Gateway Settings
uses: actions/upload-artifact@v3
uses: RDXWorks-actions/upload-artifact@main
with:
path: Directory.Build.props
name: build_props
Expand Down Expand Up @@ -285,7 +285,7 @@ jobs:
id-token: write
contents: read
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
- uses: RDXWorks-actions/checkout@main
- uses: ./.github/actions/fetch-secrets
with:
role_name: ${{ secrets.GH_BABYLON_GATEWAY_SECRETS_READ_ACCESS_ROLE }}
Expand Down Expand Up @@ -340,7 +340,7 @@ jobs:
id-token: write
contents: read
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
- uses: RDXWorks-actions/checkout@main
- uses: ./.github/actions/fetch-secrets
with:
role_name: ${{ secrets.GH_BABYLON_GATEWAY_SECRETS_READ_ACCESS_ROLE }}
Expand Down Expand Up @@ -386,7 +386,7 @@ jobs:
id-token: write
contents: read
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
- uses: RDXWorks-actions/checkout@main
- uses: ./.github/actions/fetch-secrets
with:
role_name: ${{ secrets.GH_BABYLON_GATEWAY_SECRETS_READ_ACCESS_ROLE }}
Expand Down Expand Up @@ -424,7 +424,7 @@ jobs:
id-token: write
contents: read
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
- uses: RDXWorks-actions/checkout@main
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- uses: ./.github/actions/fetch-secrets
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/postman.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
id: date
run: echo "date=$(date +'%b %d, %H:%M')" >> $GITHUB_OUTPUT
- name: Checkout gateway repo
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
uses: RDXWorks-actions/checkout@main
with:
fetch-depth: 0
- uses: ./.github/actions/fetch-secrets
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-namespace-deletion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
id-token: write
contents: read
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
- uses: RDXWorks-actions/checkout@main
- uses: ./.github/actions/fetch-secrets
with:
with:
role_name: "arn:aws:iam::308190735829:role/gh-babylon-gateway-secrets-read-access"
app_name: "babylon-gateway"
step_name: "dispatch-pr-hns-deletion-events"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-typescript-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
id-token: write
contents: read
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
- uses: RDXWorks-actions/checkout@main
- uses: ./.github/actions/fetch-secrets
with:
role_name: "arn:aws:iam::308190735829:role/gh-babylon-gateway-secrets-read-access"
Expand All @@ -29,7 +29,7 @@ jobs:
secret_name: "github-actions/radixdlt/babylon-gateway/npm-publishing-secret"
parse_json: true
- name: Use Node.js
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516
uses: RDXWorks-actions/setup-node@main
with:
node-version: "18.x"
registry-url: "https://registry.npmjs.org"
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- uses: RDXWorks-actions/checkout@main
- name: Setup .NET SDK
uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2
uses: RDXWorks-actions/setup-dotnet@main
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Build linux binaries
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
outputs:
version-suffix: ${{ steps.setup_tags.outputs.version-suffix }}
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
- uses: RDXWorks-actions/checkout@main
- name: Get rele ase
id: get_release
uses: RDXWorks-actions/get-release@main
Expand All @@ -57,7 +57,7 @@ jobs:
github_event_name: ${{ github.event_name }}
github_action_name: ${{ github.event.action}}
- name: Publish Gateway Settings
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
uses: RDXWorks-actions/upload-artifact@main
with:
path: Directory.Build.props
name: build_props
Expand Down Expand Up @@ -298,7 +298,7 @@ jobs:
contents: read
deployments: write
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
- uses: RDXWorks-actions/checkout@main
- uses: radixdlt/public-iac-resuable-artifacts/fetch-secrets@main
with:
role_name: ${{ secrets.AWS_ROLE_NAME_SNYK_SECRET }}
Expand All @@ -308,13 +308,13 @@ jobs:
secret_name: ${{ secrets.AWS_SECRET_NAME_SNYK }}
parse_json: true
- name: Setup .NET SDK
uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a
uses: RDXWorks-actions/setup-dotnet@main
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Install dependencies
run: dotnet restore
- name: Enable Snyk online monitoring to check for vulnerabilities
uses: snyk/actions/dotnet@b98d498629f1c368650224d6d212bf7dfa89e4bf # v0.4.0
uses: RDXWorks-actions/snyk-actions/dotnet@master
with:
args: --all-projects --org=${{ env.SNYK_NETWORK_ORG_ID }} --target-reference=${{ github.ref_name }}
command: monitor
Expand All @@ -324,7 +324,7 @@ jobs:
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
- uses: RDXWorks-actions/checkout@main
- uses: radixdlt/public-iac-resuable-artifacts/fetch-secrets@main
with:
role_name: ${{ secrets.AWS_ROLE_NAME_SNYK_SECRET }}
Expand All @@ -334,13 +334,13 @@ jobs:
secret_name: ${{ secrets.AWS_SECRET_NAME_SNYK }}
parse_json: true
- name: Setup .NET SDK
uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a
uses: RDXWorks-actions/setup-dotnet@main
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Install dependencies
run: dotnet restore
- name: Generate SBOM
uses: snyk/actions/node@b98d498629f1c368650224d6d212bf7dfa89e4bf # v0.4.0
uses: RDXWorks-actions/snyk-actions/node@master
with:
args: --all-projects --org=${{ env.SNYK_NETWORK_ORG_ID }} --format=cyclonedx1.4+json --json-file-output sbom.json
command: sbom
Expand Down

0 comments on commit 6b9b987

Please sign in to comment.