Skip to content

Commit

Permalink
Merge pull request #254 from rancher/eio-secret
Browse files Browse the repository at this point in the history
Transition from GH secrets to Vault
  • Loading branch information
mallardduck authored Jul 30, 2024
2 parents 8f18886 + 549a2b6 commit cd7d3a5
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,27 @@ on:
tags:
- 'v*'

# GitHub settings / example values:
#
# org level vars:
# - PUBLIC_REGISTRY: docker.io
# repo level vars:
# - PUBLIC_REGISTRY_REPO: rancher
# repo level secrets:
# - PUBLIC_REGISTRY_USERNAME
# - PUBLIC_REGISTRY_PASSWORD

permissions:
contents: write # Upload artefacts to release.
id-token: write # required by read-vault-secrets.

jobs:

publish-public:
runs-on: ubuntu-latest

steps:
- name: Login to DockerHub
- 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
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: ${{ vars.PUBLIC_REGISTRY }}
username: ${{ secrets.PUBLIC_REGISTRY_USERNAME }}
password: ${{ secrets.PUBLIC_REGISTRY_PASSWORD }}
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_PASSWORD }}
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
Expand Down

0 comments on commit cd7d3a5

Please sign in to comment.