-
Notifications
You must be signed in to change notification settings - Fork 1
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
Adapt workflows - Add id provider to auth - Add logout #70
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
885976b
fix - add id provider to env and oidc ts
5254df1
feat - add logout action
431ac89
fix - correct typo on inseegroupedefaut token part
03b188c
fix - correct typo on inseegroupedefaut token part
a6c6dbd
feat - finalize first logout version
04b57a0
chore - modify gh workflows
0c22378
chore - increment version
4331314
fix - consider review changes
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 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 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,112 @@ | ||
name: Main Branch CI | ||
on: | ||
push: | ||
branches: | ||
- develop | ||
pull_request: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
test_lint: | ||
runs-on: ubuntu-latest | ||
if: ${{ !github.event.created && github.repository != 'garronej/ts-ci' }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
- uses: bahmutov/npm-install@v1 | ||
- name: If this step fails run 'yarn lint' and 'yarn format' then commit again. | ||
run: | | ||
yarn lint:check | ||
yarn format:check | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
needs: test_lint | ||
strategy: | ||
matrix: | ||
node: ["16", "18"] | ||
os: [ubuntu-latest] | ||
name: Test with Node v${{ matrix.node }} on ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
- uses: bahmutov/npm-install@v1 | ||
- run: yarn build | ||
- run: echo "you should replace this line by yarn test (with green test)" | ||
|
||
check_if_version_upgraded: | ||
name: Check if version upgrade | ||
# When someone forks the repo and opens a PR we want to enables the tests to be run (the previous jobs) | ||
# but obviously only us should be allowed to release. | ||
# In the following check we make sure that we own the branch this CI workflow is running on before continuing. | ||
if: | | ||
github.event_name == 'push' || | ||
github.event.pull_request.head.repo.owner.login == github.event.pull_request.base.repo.owner.login | ||
runs-on: ubuntu-latest | ||
needs: test | ||
outputs: | ||
from_version: ${{ steps.step1.outputs.from_version }} | ||
to_version: ${{ steps.step1.outputs.to_version }} | ||
is_upgraded_version: ${{ steps.step1.outputs.is_upgraded_version }} | ||
is_pre_release: ${{steps.step1.outputs.is_pre_release }} | ||
steps: | ||
- uses: garronej/[email protected] | ||
id: step1 | ||
with: | ||
action_name: is_package_json_version_upgraded | ||
branch: ${{ github.head_ref || github.ref }} | ||
|
||
create_github_release: | ||
runs-on: ubuntu-latest | ||
# We create release only if the version in the package.json have been upgraded and this CI is running against the main branch. | ||
# We allow branches with a PR open on main to publish pre-release (x.y.z-rc.u) but not actual releases. | ||
if: | | ||
needs.check_if_version_upgraded.outputs.is_upgraded_version == 'true' && | ||
( | ||
github.event_name == 'push' || | ||
needs.check_if_version_upgraded.outputs.is_pre_release == 'true' | ||
) | ||
needs: | ||
- check_if_version_upgraded | ||
steps: | ||
- uses: softprops/action-gh-release@v1 | ||
with: | ||
name: Release Candidate v${{ needs.check_if_version_upgraded.outputs.to_version }}-rc | ||
tag_name: v${{ needs.check_if_version_upgraded.outputs.to_version }}-rc | ||
target_commitish: ${{ github.head_ref || github.ref }} | ||
generate_release_notes: true | ||
draft: false | ||
prerelease: ${{ needs.check_if_version_upgraded.outputs.is_pre_release == 'true' }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
docker: | ||
needs: check_if_version_upgraded | ||
if: | | ||
needs.check_if_version_upgraded.outputs.is_upgraded_version == 'true' && | ||
( | ||
github.event_name == 'push' || | ||
needs.check_if_version_upgraded.outputs.is_pre_release == 'true' | ||
) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.ref }} | ||
- uses: actions/setup-node@v3 | ||
- uses: docker/setup-qemu-action@v2 | ||
- uses: docker/setup-buildx-action@v2 | ||
- uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- uses: docker/build-push-action@v4 | ||
with: | ||
platforms: linux/amd64,linux/arm64 | ||
context: . | ||
push: true | ||
tags: | | ||
inseefr/platine-management:${{ needs.check_if_version_upgraded.outputs.to_version }}-rc | ||
inseefr/platine-management:latest |
This file contains 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 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 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 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 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 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 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il manque pas un d et un l là ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non j'ai rectifié le nom aux endroits ou cela apparait dans l'appli, le token porte bien un vecteur "inseegroupedefaut" (écriture française)