Skip to content

Instantly share code, notes, and snippets.

@uvulpos
Created March 29, 2024 19:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uvulpos/cdfecd987a0e7bb10ca1461d30f08b79 to your computer and use it in GitHub Desktop.
Save uvulpos/cdfecd987a0e7bb10ca1461d30f08b79 to your computer and use it in GitHub Desktop.
Deploy IaC in Pipeline and store kubeconfig as secret [untested]
jobs:
deploy-infrastructure:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: install terraform
uses: hashicorp/setup-terraform@v3
- name: deploy terraform
run: ...
- name: store kubeconfig as secret
run: gh secret set MY_SECRET_FILE --body temp.txt --repo user/repo
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment