Create GitHub Actions workflows for JWT and encrypted-token CI auth.
Usage
use_gha_jwt_token(
client_name = get_client_name(),
jwt = "MEETUPR_JWT_TOKEN",
client_key = "MEETUPR_client_key",
overwrite = FALSE,
filename = ".github/workflows/meetupr-jwt-token.yml"
)
use_gha_encrypted_token(
token_path = get_encrypted_path(),
overwrite = FALSE,
filename = ".github/workflows/meetupr-rotate-token.yml"
)Arguments
- client_name
A string representing the name of the client. By default, it is set to
"meetupr"and retrieved from theMEETUPR_CLIENT_NAMEenvironment variable.- jwt
Name of the GitHub secret that contains the JWT token. Defaults to "MEETUPR_JWT_TOKEN".
- client_key
Name of the GitHub secret that contains the client id. Defaults to "MEETUPR_client_key".
- overwrite
If FALSE and file exists, function aborts.
- filename
Path to write the workflow YAML file. Defaults to appropriate path in
.github/workflows/.- token_path
Path to the encrypted token file in the repo. Defaults to get_encrypted_path().
Details
These helpers write workflow YAML into .github/workflows/ so you can
enable non-interactive authentication for meetupr in GitHub Actions.
Which helper to use:
use_gha_jwt_token(): For Meetup Pro accounts that use a static JWT token. The generated workflow provides a JWT and client id as repository secrets so the runner can authenticate via JWT.
use_gha_encrypted_token(): For regular OAuth apps. This creates a rotation workflow that loads an encrypted
.meetupr.rdstoken, refreshes it when needed, and writes the rotated encrypted file back to the repo. Requires a decryption password stored as a repository secret (default: MEETUPR_ENCRYPT_PWD).
Important notes:
These functions only write the workflow YAML. They do not create repository secrets or commit/push files for you.
Review the generated YAML and add the required secrets in your repository settings before enabling the workflow.
