-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (84 loc) · 3.11 KB
/
android.yml
File metadata and controls
95 lines (84 loc) · 3.11 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Android CI
on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]
types: [opened, synchronize, reopened]
permissions: write-all
jobs:
build:
runs-on: ubuntu-latest
steps:
# - name: checkout
# uses: actions/[email protected]
# - name: JDK 17 를 준비한다.
# uses: actions/setup-java@v4
# with:
# java-version: '17'
# distribution: 'temurin'
#cache: gradle
# - name: gradlew 의 root 실행권한을 부여한다.
# run: chmod +x gradlew
#- name: Gradle 을 빌드한다.
# run: ./gradlew build --stacktrace
#- name: 유닛 테스트를 실행한다.
# run: ./gradlew test
- name: Debug Secrets
env:
GITHUB_TOKEN: ${{ secrets.IKSEONG_PAT }}
run: |
if [ -z "$GITHUB_TOKEN" ]; then
echo "GITHUB_TOKEN is not set"
else
echo "GITHUB_TOKEN is set"
fi
- name: rest api 확인
run: |
curl -X GET \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-H "Content-Type: application/json" \
https://api.github.com/orgs/OurMenu/repos
- name: rest api 확인4
env:
GITHUB_TOKEN: ${{ env.IKSEONG_PAT }}
run: |
curl -X GET \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-H "Content-Type: application/json" \
https://api.github.com/orgs/OurMenu/repos
- name: rest api 확인2
run: |
curl -X GET \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/orgs/OurMenu/repos
- name: rest api 확인3
run: |
curl -X GET \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-H "Content-Type: application/json" \
https://api.github.com/orgs/OurMenu/repos
- name: Close Pull Request on Failure
#if: failure() # 이전 단계 중 하나라도 실패했을 경우 실행
env:
GITHUB_TOKEN: ${{ secrets.IKSEONG_PAT }}
G_TOKEN: ${{ github.IKSEONG_PAT }}
run: |
echo "Repository: ${{ github.repository }}"
echo "Pull Request Number: ${{ github.event.pull_request.number }}"
echo "Actor: ${{ github.actor }}"
echo "Event Name: ${{ github.event_name }}"
echo "GIT TOKEN : $GITHUB_TOKEN, G_TOKEN : $G_TOKEN"
curl -X PATCH \
-H "Authorization: Bearer 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" \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-H "User-Agent: OurMenu" \
-H "Content-Type: application/json" \
-d '{"state": "close"}' \
https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}