generated from moderneinc/rewrite-recipe-starter
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Standardize project build before publication
- Loading branch information
Showing
21 changed files
with
135 additions
and
249 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,59 +1,15 @@ | ||
# Description: This workflow is triggered when the `receive-pr` workflow completes to post suggestions on the PR. | ||
# Since this pull request has write permissions on the target repo, we should **NOT** execute any untrusted code. | ||
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ | ||
--- | ||
name: comment-pr | ||
|
||
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#using-data-from-the-triggering-workflow | ||
on: | ||
workflow_run: | ||
workflows: ["receive-pr"] | ||
types: | ||
- completed | ||
|
||
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ | ||
# Since this pull request has write permissions on the target repo, we should **NOT** execute any untrusted code. | ||
jobs: | ||
post-suggestions: | ||
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-a-workflow-based-on-the-conclusion-of-another-workflow | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
pull-requests: write | ||
env: | ||
# https://docs.github.com/en/actions/reference/authentication-in-a-workflow#permissions-for-the-github_token | ||
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{github.event.workflow_run.head_branch}} | ||
repository: ${{github.event.workflow_run.head_repository.full_name}} | ||
|
||
# Download the patch | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: patch | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
run-id: ${{ github.event.workflow_run.id }} | ||
- name: Apply patch | ||
run: | | ||
git apply git-diff.patch --allow-empty | ||
rm git-diff.patch | ||
# Download the PR number | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: pr_number | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
run-id: ${{ github.event.workflow_run.id }} | ||
- name: Read pr_number.txt | ||
run: | | ||
PR_NUMBER=$(cat pr_number.txt) | ||
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV | ||
rm pr_number.txt | ||
# Post suggestions as a comment on the PR | ||
- uses: googleapis/code-suggester@v4 | ||
with: | ||
command: review | ||
pull_number: ${{ env.PR_NUMBER }} | ||
git_dir: '.' | ||
uses: openrewrite/gh-automation/.github/workflows/comment-pr.yml@main |
This file was deleted.
Oops, something went wrong.
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,22 @@ | ||
--- | ||
name: publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- v[0-9]+.[0-9]+.[0-9]+ | ||
- v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+ | ||
|
||
concurrency: | ||
group: publish-${{ github.ref }} | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
release: | ||
uses: openrewrite/gh-automation/.github/workflows/publish-gradle.yml@main | ||
secrets: | ||
gradle_enterprise_access_key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | ||
ossrh_username: ${{ secrets.OSSRH_USERNAME }} | ||
ossrh_token: ${{ secrets.OSSRH_TOKEN }} | ||
ossrh_signing_key: ${{ secrets.OSSRH_SIGNING_KEY }} | ||
ossrh_signing_password: ${{ secrets.OSSRH_SIGNING_PASSWORD }} |
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 was deleted.
Oops, something went wrong.
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 @@ | ||
--- | ||
name: repository-backup | ||
on: | ||
workflow_dispatch: {} | ||
schedule: | ||
- cron: 0 17 * * * | ||
|
||
concurrency: | ||
group: backup-${{ github.ref }} | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
repository-backup: | ||
uses: openrewrite/gh-automation/.github/workflows/repository-backup.yml@main | ||
secrets: | ||
bucket_mirror_target: ${{ secrets.S3_GITHUB_REPOSITORY_BACKUPS_BUCKET_NAME }} | ||
bucket_access_key_id: ${{ secrets.S3_GITHUB_REPOSITORY_BACKUPS_ACCESS_KEY_ID }} | ||
bucket_secret_access_key: ${{ secrets.S3_GITHUB_REPOSITORY_BACKUPS_SECRET_ACCESS_KEY }} |
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,8 +1,49 @@ | ||
build/ | ||
target/ | ||
.gradle/ | ||
# Compiled class file | ||
*.class | ||
|
||
# Log file | ||
*.log | ||
|
||
# BlueJ files | ||
*.ctxt | ||
|
||
# Mobile Tools for Java (J2ME) | ||
.mtj.tmp/ | ||
|
||
# Package Files # | ||
*.war | ||
*.nar | ||
*.ear | ||
*.zip | ||
*.tar.gz | ||
*.rar | ||
|
||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
hs_err_pid* | ||
replay_pid* | ||
|
||
.gradle | ||
**/build/ | ||
!src/**/build/ | ||
|
||
# Ignore Gradle GUI config | ||
gradle-app.setting | ||
|
||
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) | ||
!gradle-wrapper.jar | ||
|
||
# Avoid ignore Gradle wrappper properties | ||
!gradle-wrapper.properties | ||
|
||
# Cache of project | ||
.gradletasknamecache | ||
|
||
# Eclipse Gradle plugin generated files | ||
# Eclipse Core | ||
.project | ||
# JDT-specific (Eclipse Java Development Tools) | ||
.classpath | ||
|
||
.idea/ | ||
out/ | ||
src/main/generated/ | ||
.vscode/ | ||
*.iml |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.