diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 80ececf9..3e065822 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,7 @@ name: CI on: + workflow_dispatch: push: pull_request: @@ -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 }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..67a7055d --- /dev/null +++ b/.github/workflows/release.yml @@ -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 }}