generated from pagopa/template-java-microservice
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a3c9ff4
commit 62694e4
Showing
10 changed files
with
253 additions
and
9 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<!--- Please always add a PR description as if nobody knows anything about the context these changes come from. --> | ||
<!--- Even if we are all from our internal team, we may not be on the same page. --> | ||
<!--- Write this PR as you were contributing to a public OSS project, where nobody knows you and you have to earn their trust. --> | ||
<!--- This will improve our projects in the long run! Thanks. --> | ||
|
||
#### List of Changes | ||
|
||
<!--- Describe your changes in detail --> | ||
|
||
#### Motivation and Context | ||
|
||
<!--- Why is this change required? What problem does it solve? --> | ||
|
||
#### How Has This Been Tested? | ||
|
||
<!--- Please describe in detail how you tested your changes. --> | ||
<!--- Include details of your testing environment, tests ran to see how --> | ||
<!--- your change affects other areas of the code, etc. --> | ||
|
||
#### Screenshots (if appropriate): | ||
|
||
#### Types of changes | ||
|
||
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> | ||
|
||
- [ ] Bug fix (non-breaking change which fixes an issue) | ||
- [ ] New feature (non-breaking change which adds functionality) | ||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) | ||
|
||
#### Checklist: | ||
|
||
<!--- Go over all the following points, and put an `x` in all the boxes that apply. --> | ||
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> | ||
|
||
- [ ] My change requires a change to the documentation. | ||
- [ ] I have updated the documentation accordingly. |
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,3 @@ | ||
addAssignees: author | ||
|
||
runOnDraft: true |
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,18 @@ | ||
# release.yml | ||
|
||
changelog: | ||
exclude: | ||
labels: | ||
- ignore-for-release | ||
authors: | ||
- pagopa-github-bot | ||
categories: | ||
- title: Breaking Changes 🛠 | ||
labels: | ||
- breaking-change | ||
- title: Exciting New Features 🎉 | ||
labels: | ||
- enhancement | ||
- title: Other Changes | ||
labels: | ||
- "*" |
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,26 @@ | ||
name: Auto Assign | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the main branch | ||
pull_request_target: | ||
branches: | ||
- main | ||
types: [ opened, reopened ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
build: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
- name: Assign Me | ||
# You may pin to the exact commit or the version. | ||
uses: kentaro-m/[email protected] | ||
with: | ||
configuration-path: '.github/auto_assign.yml' |
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,35 @@ | ||
name: Check PR | ||
|
||
# Controls when the workflow will run | ||
on: | ||
pull_request_target: | ||
branches: | ||
- main | ||
types: [ opened, labeled, unlabeled, reopened ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
build: | ||
name: Check Labels | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
|
||
- name: Verify PR Labels | ||
uses: jesusvasquez333/[email protected] | ||
with: | ||
github-token: '${{ secrets.GITHUB_TOKEN }}' | ||
valid-labels: 'bug, enhancement, breaking-change, ignore-for-release' | ||
pull-request-number: '${{ github.event.pull_request.number }}' | ||
|
||
- name: Label Check | ||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'breaking-change') && !contains(github.event.pull_request.labels.*.name, 'enhancement') && !contains(github.event.pull_request.labels.*.name, 'bug') && !contains(github.event.pull_request.labels.*.name, 'ignore-for-release') }} | ||
uses: actions/github-script@v3 | ||
with: | ||
script: | | ||
core.setFailed('Missing required labels') |
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,59 @@ | ||
name: Auto Deploy | ||
|
||
# Controls when the workflow will run | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
types: [ closed ] | ||
|
||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
build: | ||
if: ${{ github.event.pull_request.merged }} | ||
name: Call Azure Build Pipeline | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
|
||
# default skip bump versioning | ||
- name: Set as default skip bump versioning | ||
run: | | ||
echo "SEMVER=skip" >> $GITHUB_ENV | ||
- name: Set major | ||
run: | | ||
echo "SEMVER=major" >> $GITHUB_ENV | ||
if: ${{ contains(github.event.pull_request.labels.*.name, 'breaking-change') }} | ||
|
||
- name: Set minor | ||
run: | | ||
echo "SEMVER=minor" >> $GITHUB_ENV | ||
if: ${{ contains(github.event.pull_request.labels.*.name, 'enhancement') }} | ||
|
||
- name: Set patch | ||
run: | | ||
echo "SEMVER=patch" >> $GITHUB_ENV | ||
if: ${{ contains(github.event.pull_request.labels.*.name, 'bug') }} | ||
|
||
- name: Set skip | ||
run: | | ||
echo "SEMVER=skip" >> $GITHUB_ENV | ||
if: ${{ contains(github.event.pull_request.labels.*.name, 'ignore-for-release') }} | ||
|
||
- name: Azure Pipelines Action - Jversion | ||
uses: jacopocarlini/[email protected] | ||
with: | ||
azure-devops-project-url: https://dev.azure.com/pagopaspa/pagoPA-projects | ||
# TODO: set name | ||
azure-pipeline-name: 'pagopa-api-config.deploy' | ||
azure-devops-token: ${{ secrets.AZURE_DEVOPS_TOKEN }} | ||
azure-template-parameters: '{"ENV": "dev", "SEMVER": "${{env.SEMVER}}", "TEST": "true"}' | ||
azure-pipeline-variables: '{"system.debug": "true"}' | ||
|
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,29 @@ | ||
name: Sonar Analysis | ||
|
||
# Controls when the workflow will run | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
build: | ||
name: Call Azure Build Pipeline | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
- name: Azure Pipelines Action - Jversion | ||
uses: jacopocarlini/[email protected] | ||
with: | ||
azure-devops-project-url: https://dev.azure.com/pagopaspa/pagoPA-projects | ||
# TODO: set name | ||
azure-pipeline-name: 'pagopa-api-config.code-review' | ||
azure-devops-token: ${{ secrets.AZURE_DEVOPS_TOKEN }} | ||
azure-pipeline-variables: '{"system.debug": "true"}' | ||
|
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,42 @@ | ||
name: Open a PR in Infra repository | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
types: [ closed ] | ||
paths: | ||
- 'openapi/openapi.json' | ||
|
||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
pull-request: | ||
if: ${{ github.event.pull_request.merged }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
# prepare openapi template for infra repo | ||
- run: | | ||
mkdir -p "${GITHUB_WORKSPACE}/infra" | ||
# TODO: set basepath | ||
jq '."servers"[0]."url" |= "${host}/apiconfig/api/v1"' "${GITHUB_WORKSPACE}/openapi/openapi.json" > "${GITHUB_WORKSPACE}/infra/_openapi.json.tpl" | ||
|
||
# open a PR on infra repo | ||
- name: Create pull request | ||
uses: jacopocarlini/action-pull-request-another-repo@main | ||
env: | ||
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} | ||
with: | ||
source_folder: 'infra' | ||
destination_repo: 'pagopa/pagopa-infra' | ||
# TODO: set destination folder | ||
destination_folder: 'src/api/apiconfig_api/v1' | ||
destination_base_branch: 'main' | ||
destination_head_branch: 'SpontaneousPayments-swagger-update' | ||
user_email: '[email protected]' | ||
user_name: 'pagopa-github-bot' | ||
allow_force_push: 'true' |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
target/**/* | ||
.vscode | ||
.vscode | ||
/.idea/ |
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