Skip to content

Instantly share code, notes, and snippets.

@norwd
Created December 24, 2022 23:23
Show Gist options
  • Save norwd/dde0a1e99a173b15595dd6a480a0cd56 to your computer and use it in GitHub Desktop.
Save norwd/dde0a1e99a173b15595dd6a480a0cd56 to your computer and use it in GitHub Desktop.
Use GitHub Actions to keep a repo private even if made public manually.
---
on: public
jobs:
make-private:
runs-on: ubuntu-latest
steps:
- run: gh repo edit ${{ github.repository }} --visibility private
env:
GH_TOKEN: ${{ secrets.KEEP_REPO_PRIVATE }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment