Skip to content

Commit

Permalink
chore: Use secret from vault to get ccp crate (#2338)
Browse files Browse the repository at this point in the history
* Use secret from vault

* Fix

* Fix
  • Loading branch information
nahsi committed Jul 31, 2024
1 parent 42d2fed commit f6b654e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 24 deletions.
36 changes: 15 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ on:
description: "Cargo dependencies map"
type: string
default: "null"
secrets:
github_priv_key:
description: "github private key"
required: true

jobs:
build:
Expand Down Expand Up @@ -43,15 +39,26 @@ jobs:
id-token: write

steps:
- name: Import secrets
uses: hashicorp/vault-action@v3.0.0
with:
url: https://vault.fluence.dev
path: jwt/github
role: ci
method: jwt
jwtGithubAudience: "https://github.com/fluencelabs"
jwtTtl: 300
secrets: |
kv/ci/fluence-artifacts id | AWS_ACCESS_KEY_ID ;
kv/ci/fluence-artifacts secret | AWS_SECRET_ACCESS_KEY ;
kv/github/tokens/fluencebot token | GITHUB_PAT ;
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: fluencelabs/nox
ref: ${{ inputs.ref }}

- name: Setup Git
run: |
git config --global url."https://x-access-token:${{ secrets.github_priv_key }}@github.com".insteadOf ssh://git@github.com
token: ${{ env.GITHUB_PAT }}

- name: Get PR labels
id: labels
Expand Down Expand Up @@ -104,19 +111,6 @@ jobs:
name: nox-${{ matrix.arch }}
path: target/${{ matrix.target }}/${{ steps.profile.outputs.profile }}/nox

- name: Import secrets
uses: hashicorp/vault-action@v3.0.0
with:
url: https://vault.fluence.dev
path: jwt/github
role: ci
method: jwt
jwtGithubAudience: "https://github.com/fluencelabs"
jwtTtl: 300
secrets: |
kv/ci/fluence-artifacts id | AWS_ACCESS_KEY_ID ;
kv/ci/fluence-artifacts secret | AWS_SECRET_ACCESS_KEY
- name: Rename nox binary
run: |
mkdir -p s3
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ jobs:
uses: ./.github/workflows/build.yml
with:
ref: ${{ github.ref }}
secrets:
github_priv_key: ${{ secrets.FLUENCEBOT_PRIVATE_KEY }}


nox-snapshot:
name: "nox"
needs: nox
Expand Down

0 comments on commit f6b654e

Please sign in to comment.