-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (49 loc) · 1.56 KB
/
create_java_package.yml
File metadata and controls
56 lines (49 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Create Java Package
on:
pull_request:
types:
- closed
branches:
- 'main'
paths:
- 'java/**'
jobs:
create_java_package_and_push:
name: Create Java package and push
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout main branch
uses: actions/checkout@v3
with:
ref: main
- name: Define global config git
run: |
git config --global user.name "Github Actions"
git config --global user.email "github-action@users.noreply.github.com"
- name: Zip Java files
run: |
zip -r ../java.zip java
- name: Move zip Java file to workspace
run: |
mv ../java.zip .
- name: Push zip Java file to new branch
run: |
git add java.zip
git commit -am "Added new Java package: '${{ github.event.pull_request.title }}'"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
base: main
branch: feature/java-pr_${{ github.event.pull_request.number }}-${{ github.event.created_at }}
branch-suffix: timestamp
committer: 'Github Actions <github-action@users.noreply.github.com>'
author: 'Github Actions <github-action@users.noreply.github.com>'
title: ${{ github.event.pull_request.title }}
body: ${{ github.event.pull_request.body }}
labels: |
java
automated pr