Skip to content

Commit

Permalink
added steps to read migrated secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
enrichman committed Apr 24, 2024
1 parent 36d1121 commit 7d7f4e8
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: CI

on:
workflow_dispatch:
push:
pull_request:

Expand All @@ -25,3 +26,21 @@ jobs:

- name: Build
run: make build

fossa:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # needed for the Vault authentication

steps:
- name: "Load Secrets from Vault"
uses: rancher-eio/read-vault-secrets@main
with:
secrets: |
secret/data/github/repo/${{ github.repository }}/fossa/credentials token | FOSSA
- uses: actions/checkout@v3

- uses: fossas/fossa-action@main
with:
api-key: ${{ env.FOSSA }}
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release

on:
workflow_dispatch:
push:
tags:
- v*

jobs:
release:
permissions:
contents: read
id-token: write # needed for the Vault authentication
runs-on: ubuntu-latest

steps:
- name: "Load Secrets from Vault"
uses: rancher-eio/read-vault-secrets@main
with:
secrets: |
secret/data/github/repo/${{ github.repository }}/dockerhub/rancher/credentials username | DOCKER_USERNAME ;
secret/data/github/repo/${{ github.repository }}/dockerhub/rancher/credentials password | DOCKER_PASSWORD ;
- uses: actions/checkout@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_PASSWORD }}

0 comments on commit 7d7f4e8

Please sign in to comment.