Skip to content
Discussion options

You must be logged in to vote

For the non-legacy use cases (timed release, a company open-sourcing after a set period), there's a DIY version that works today: a scheduled Actions workflow that flips the visibility on your target date.

name: go-public
on:
  schedule:
    - cron: "0 9 1 6 *" # adjust to your target date
jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - run: gh repo edit OWNER/REPO --visibility public
        env:
          GH_TOKEN: ${{ secrets.VISIBILITY_PAT }}

Three caveats:

  1. You need a PAT with admin rights on the repo stored as a secret — the default GITHUB_TOKEN can't change visibility.
  2. on.schedule only supports cron, not one-time dates. Point the cron at your target date and delete o…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Vasiliy-Makogon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Repositories The core of version-controlled code storage Product Feedback Share your thoughts and suggestions on GitHub features and improvements Welcome 🎉 Used to greet and highlight first-time discussion participants. Welcome to the community! source:ui Discussions created via Community GitHub templates
3 participants