-
Notifications
You must be signed in to change notification settings - Fork 43
feat: dev and release pipelines #590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
8766257
feat: adds draft of workflows
namsnath ee98403
update: enable auth-react
namsnath 493ca70
feat: migrates dev and release tag steps
namsnath 8c03220
fix: mark as success http method
namsnath fa8a8bb
feat: setup testable pipelines
namsnath 7ba12bb
fix: minor issues with workflows
namsnath 11906e3
update: move tests to commit, simplify pipelines
namsnath 976d413
update: backend-sdk-testing to match webauthn branch
namsnath 2cf6094
update: remove placeholder step
namsnath ba0b7af
update: enable steps, add option to skip tests check
namsnath fc331fd
fix: add steps to lint-code workflow
namsnath 2324102
update: adds publish doc job
namsnath 4a5bbf1
feat: adds app server log dir for website tests
namsnath 796a1a6
Apply suggestions from code review
namsnath 7ba4271
fix: remove backtick
namsnath d0e7388
fix: backticks, conditionals
namsnath 1b64abc
update: use new PAT
namsnath e97a9fe
feat: adds concurrency limits to test workflows
namsnath 7d3bec7
update: cleanup comment
namsnath 4160c92
fix: minor syntax issues
namsnath bfc26f3
fix: minor syntax issues
namsnath e1d6f05
update: docs workflow stage to prod
namsnath File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
name: "Dev Tag Pipeline" | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
branch: | ||
description: The branch to create the dev tag on | ||
type: string | ||
required: true | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
|
||
outputs: | ||
constantsVersion: ${{ steps.versions.outputs.constantsVersion }} | ||
constantsVersionXy: ${{ steps.versions.outputs.constantsVersionXy }} | ||
setupVersion: ${{ steps.versions.outputs.setupVersion }} | ||
setupVersionXy: ${{ steps.versions.outputs.setupVersionXy }} | ||
newestVersion: ${{ steps.versions.outputs.newestVersion }} | ||
targetBranch: ${{ steps.versions.outputs.targetBranch }} | ||
devTag: ${{ steps.versions.outputs.devTag }} | ||
releaseTag: ${{ steps.versions.outputs.releaseTag }} | ||
|
||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.branch }} | ||
# Need a complete fetch to make the master merge check work | ||
fetch-depth: 0 | ||
fetch-tags: true | ||
token: ${{ secrets.ALL_REPO_PAT }} | ||
|
||
|
||
- name: Setup git | ||
run: | | ||
# NOTE: The user email is {user.id}+{user.login}@users.noreply.github.com. | ||
# See users API: https://api.github.com/users/github-actions%5Bbot%5D | ||
git config user.name "github-actions[bot]" | ||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
|
||
git fetch origin master | ||
- name: Check if branch needs master merge | ||
run: | | ||
if [[ $(git log origin/master ^HEAD) != "" ]]; then | ||
echo "You need to merge master into this branch." | ||
exit 1 | ||
fi | ||
|
||
- name: Populate variables | ||
id: versions | ||
run: | | ||
. ./hooks/populate-hook-constants.sh | ||
|
||
echo "constantsVersion=$constantsVersion" | tee -a "$GITHUB_OUTPUT" "$GITHUB_ENV" | ||
echo "constantsVersionXy=$constantsVersionXy" | tee -a "$GITHUB_OUTPUT" "$GITHUB_ENV" | ||
echo "setupVersion=$setupVersion" | tee -a "$GITHUB_OUTPUT" "$GITHUB_ENV" | ||
echo "setupVersionXy=$setupVersionXy" | tee -a "$GITHUB_OUTPUT" "$GITHUB_ENV" | ||
echo "newestVersion=$newestVersion" | tee -a "$GITHUB_OUTPUT" "$GITHUB_ENV" | ||
echo "targetBranch=$targetBranch" | tee -a "$GITHUB_OUTPUT" "$GITHUB_ENV" | ||
|
||
echo "devTag=dev-v$setupVersion" | tee -a "$GITHUB_OUTPUT" "$GITHUB_ENV" | ||
echo "releaseTag=v$setupVersion" | tee -a "$GITHUB_OUTPUT" "$GITHUB_ENV" | ||
|
||
- name: Check tag and branch correctness | ||
run: | | ||
if [[ "${{ steps.versions.outputs.setupVersion }}" != ${{ inputs.branch }}* ]] | ||
namsnath marked this conversation as resolved.
Show resolved
Hide resolved
|
||
then | ||
echo "Adding tag to wrong branch" | ||
exit 1 | ||
fi | ||
|
||
if git rev-parse ${{ steps.versions.outputs.releaseTag }} >/dev/null 2>&1 | ||
then | ||
echo "The released version of this tag already exists." | ||
exit 1 | ||
fi | ||
|
||
- name: Delete tag if already tagged | ||
run: | | ||
git tag --delete ${{ steps.versions.outputs.devTag }} || true | ||
git push --delete origin ${{ steps.versions.outputs.devTag }} || true | ||
|
||
- name: Install dependencies | ||
run: make dev-install | ||
|
||
- name: Build docs | ||
run: make build-docs | ||
|
||
- name: Commit doc changes | ||
run: | | ||
git add --all | ||
git commit --allow-empty -nm "doc: update docs for ${{ steps.versions.outputs.releaseTag }} tag" | ||
git push | ||
|
||
- name: Create and push tag | ||
run: | | ||
# NOTE: The user email is {user.id}+{user.login}@users.noreply.github.com. | ||
# See users API: https://api.github.com/users/github-actions%5Bbot%5D | ||
git config user.name "github-actions[bot]" | ||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
|
||
git tag ${{ steps.versions.outputs.devTag }} | ||
git push --tags --follow-tags | ||
|
||
mark-dev-tag-as-not-passed: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- setup | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ needs.setup.outputs.devTag }} | ||
fetch-tags: true | ||
|
||
- id: versions | ||
uses: supertokens/get-supported-versions-action@main | ||
with: | ||
has-cdi: true | ||
has-fdi: true | ||
|
||
- run: | | ||
./hooks/populate-hook-constants.sh | ||
|
||
curl --fail-with-body -X PUT \ | ||
https://api.supertokens.io/0/driver \ | ||
-H 'Content-Type: application/json' \ | ||
-H 'api-version: 0' \ | ||
-d "{ | ||
\"password\": \"${{ secrets.SUPERTOKENS_API_KEY }}\", | ||
\"version\":\"${{ needs.setup.outputs.setupVersion }}\", | ||
\"name\": \"python\", | ||
\"frontendDriverInterfaces\": ${{ steps.versions.outputs.fdiVersions }}, | ||
\"coreDriverInterfaces\": ${{ steps.versions.outputs.cdiVersions }} | ||
}" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.