-
Notifications
You must be signed in to change notification settings - Fork 1
Workflow upgrade #90
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
Workflow upgrade #90
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
78f6a18
use our build workflow
carojeandat 4f212c2
delete test branch
carojeandat f14041d
add properties
carojeandat 5b03226
fix test
carojeandat bd79e06
fix test
carojeandat d4869b6
fix test
carojeandat 29a998f
Remove license comment from sonar properties
carojeandat 5adfe77
Revert "Remove license comment from sonar properties"
carojeandat 9f4f992
add release and patch workflows
carojeandat dd22c13
change sonar project name
carojeandat 2dca536
Update sonar-project.properties
carojeandat 628710c
update README.md
carojeandat d731929
Merge remote-tracking branch 'origin/workflow-upgrade' into workflow-…
carojeandat 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,64 +1,20 @@ | ||
| name: CI | ||
|
|
||
| on: [push] | ||
| on: | ||
| push: | ||
| branches: | ||
| - 'main' | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| license-headers: | ||
| name: Check licenses headers | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/setup-node@v3 | ||
| - name: Checkout sources | ||
| uses: actions/checkout@v2 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Check License Header (Check Mode) | ||
| uses: apache/skywalking-eyes/header@v0.5.0 | ||
| with: | ||
| config: .github/config/.licenserc.yaml | ||
|
|
||
| build-and-deploy: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v2 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly. | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Parse tag | ||
| id: vars | ||
| run: echo ::set-output name=tag::${GITHUB_REF_NAME#v} | ||
|
|
||
| - name: Install and Build | ||
| run: | | ||
| npm install | ||
| npm run licenses-check | ||
| npm run-script test | ||
| npm run-script build | ||
|
|
||
| - name: Build and publish Docker image - Main | ||
| if: github.ref == 'refs/heads/main' | ||
| uses: elgohr/Publish-Docker-Github-Action@33a481be3e179353cb7793a92b57cf9a6c985860 # v4 | ||
| with: | ||
| name: gridsuite/gridXXX-app | ||
| username: gridsuiteci | ||
| password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
|
||
| - name: Build and publish Docker image - Tag | ||
| if: startsWith(github.ref, 'refs/tags/') | ||
| uses: elgohr/Publish-Docker-Github-Action@33a481be3e179353cb7793a92b57cf9a6c985860 # v4 | ||
| with: | ||
| name: gridsuite/gridstudy-app | ||
| username: gridsuiteci | ||
| password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
| tags: ${{ steps.vars.outputs.tag }} | ||
|
|
||
| - name: Broadcast update event | ||
| if: github.ref == 'refs/heads/main' | ||
| uses: gridsuite/broadcast-event@main | ||
| with: | ||
| token: ${{ secrets.REPO_ACCESS_TOKEN }} | ||
| event-type: gridXXX_app_updated | ||
| build: | ||
| uses: powsybl/github-ci/.github/workflows/build-frontend-app-generic.yml@3ed0caeb3395e55868884f466d726ddaee877850 | ||
| with: | ||
| dockerImage: gridsuite/gridXXX-app | ||
| dockerUsername: gridsuiteci | ||
| eventType: gridXXX_app_updated | ||
| licensercPath: .github/config/.licenserc.yaml | ||
| secrets: | ||
| sonar-token: ${{ secrets.SONAR_TOKEN }} | ||
| DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | ||
| repo-token: ${{ secrets.REPO_ACCESS_TOKEN }} |
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,22 @@ | ||
| name: Patch | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| releaseVersion: | ||
| description: Release version (vX.X) | ||
| required: true | ||
| type: string | ||
|
|
||
| jobs: | ||
| run-patch: | ||
| uses: powsybl/github-ci/.github/workflows/patch-frontend-app-generic.yml@3ed0caeb3395e55868884f466d726ddaee877850 | ||
| with: | ||
| releaseVersion: ${{ github.event.inputs.releaseVersion }} | ||
| dockerImage: docker.io/gridsuite/gridXXX-app | ||
| dockerUsername: gridsuiteci | ||
| githubappId: ${{ vars.GRIDSUITE_ACTIONS_APPID }} | ||
| secrets: | ||
| VERSIONBUMP_GHAPP_PRIVATE_KEY: ${{ secrets.VERSIONBUMP_GHAPP_PRIVATE_KEY }} | ||
| DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | ||
| sonar-token: ${{ secrets.SONAR_TOKEN }} |
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,27 @@ | ||
| name: Release | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| releaseVersion: | ||
| description: Release version (vX.X) | ||
| required: true | ||
| type: string | ||
| gitReference: | ||
| description: SHA of the commit from where to release or branch name | ||
| required: true | ||
| type: string | ||
|
|
||
| jobs: | ||
| run-release: | ||
| uses: powsybl/github-ci/.github/workflows/release-frontend-app-generic.yml@3ed0caeb3395e55868884f466d726ddaee877850 | ||
| with: | ||
| releaseVersion: ${{ github.event.inputs.releaseVersion }} | ||
| commitSha: ${{ github.event.inputs.gitReference }} | ||
| dockerImage: docker.io/gridsuite/gridXXX-app | ||
| dockerUsername: gridsuiteci | ||
| githubappId: ${{ vars.GRIDSUITE_ACTIONS_APPID }} | ||
| secrets: | ||
| VERSIONBUMP_GHAPP_PRIVATE_KEY: ${{ secrets.VERSIONBUMP_GHAPP_PRIVATE_KEY }} | ||
| DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | ||
| sonar-token: ${{ secrets.SONAR_TOKEN }} |
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,9 @@ | ||
| # This Source Code Form is subject to the terms of the Mozilla Public | ||
| # License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| # file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
|
|
||
| sonar.projectKey=gridsuite_gridapp-template | ||
| sonar.organization=gridsuite | ||
| sonar.projectBaseDir=src | ||
| sonar.javascript.lcov.reportPaths=./coverage/lcov.info | ||
| sonar.cpd.exclusions=**/translations/** | ||
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.