Created
December 6, 2021 14:38
-
-
Save gitrgoliveira/ad414a00fd0041cb1c090eba47f13d1f to your computer and use it in GitHub Desktop.
a GitHub Action that read from Vault and builds a docker image.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ImageBuilder | |
# Run this workflow every time a new commit pushed to your repository | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
build: | |
permissions: | |
contents: read | |
id-token: write | |
runs-on: ubuntu-latest | |
# runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Import Secrets | |
uses: hashicorp/[email protected] | |
with: | |
url: https://vault-cluster.vault.11eab575-aee3-cf27-adc9-0242ac11000a.aws.hashicorp.cloud:8200 | |
namespace: admin | |
method: jwt | |
role: demo | |
tlsSkipVerify: false | |
secrets: | | |
kv/data/ci app_secret | APP_SECRET | |
- name: Build Docker Image | |
run: docker build . --file Dockerfile --build-arg app_secret="${{ env.APP_SECRET }}" -t vault-action-exampleapp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment