GitHub Action
Retrieve Auth0 Access Token
This action logs into Auth0 and returns the access token.
- uses: Kajatin/auth0-login@v1
with:
# The Auth0 tenant domain to request the access token from.
tenant-url: 'https://your-tenant.auth0.com'
# The client ID of the application that is requesting the access token.
# Required: true
client-id: 'xD3f4u1t'
# The client secret of the application that is requesting the access token.
# Required: true
client-secret: 's3cr3t'
# The audience of the access token.
audience: ''
# The grant type of the access token.
# Default: client_credentials
grant-type: ''
If the action successfully logs into Auth0, it will return the following outputs:
access-token
: The access token that was retrieved from Auth0.
-
Create a new branch
git checkout -b releases/v1
-
Replace the contents of
src/
with your action code -
Add tests to
__tests__/
for your source code -
Format, test, and build the action
npm run all
This step is important! It will run
ncc
to build the final JavaScript action code with all dependencies included. If you do not run this step, your action will not work correctly when it is used in a workflow. This step also includes the--license
option forncc
, which will create a license file for all of the production node modules used in your project. -
Commit your changes
git add . git commit -m "My first action is ready!"
-
Push them to your repository
git push -u origin releases/v1
-
Create a pull request and get feedback on your action
-
Merge the pull request into the
main
branch
The action is now published! 🚀
For information about versioning your action, see Versioning in the GitHub Actions toolkit.
This project includes a helper script, script/release
designed to streamline the process of tagging and pushing new releases for
GitHub Actions.
GitHub Actions allows users to select a specific version of the action to use, based on release tags. This script simplifies this process by performing the following steps:
- Retrieving the latest release tag: The script starts by fetching the most recent release tag by looking at the local data available in your repository.
- Prompting for a new release tag: The user is then prompted to enter a new release tag. To assist with this, the script displays the latest release tag and provides a regular expression to validate the format of the new tag.
- Tagging the new release: Once a valid new tag is entered, the script tags the new release.
- Pushing the new tag to the remote: Finally, the script pushes the new tag to the remote repository. From here, you will need to create a new release in GitHub and users can easily reference the new tag in their workflows.