Skip to content

test

test #84

Workflow file for this run

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/checkout@v4.2.2
# - 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 }}