-
-
Save b1a9id/56b5e5834c7d9b99cadab8d0e89533cf to your computer and use it in GitHub Desktop.
GitHub Actionsの実行ログをS3にアップロードするワークフロー
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
name: Upload CI Log | |
on: | |
schedule: | |
- cron: '0 1 * * *' | |
jobs: | |
upload: | |
name: CI Log uplaad | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
repository: | |
- repo-a | |
- repo-b | |
- repo-c | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- name: Cache modules | |
uses: actions/cache@v2 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Upload | |
env: | |
AWS_REGION: ap-northeast-1 | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
# GitHub APIを叩くための個人アクセストークン | |
DOWNLOAD_LOGS_ACCESS_TOKEN: ${{ secrets.DOWNLOAD_LOGS_ACCESS_TOKEN }} | |
run: | | |
./gradlew -x test build | |
# 引数はOrganization名/Repository名 | |
java -jar ./build/libs/upload-ci-logs.jar Hoge/${{ matrix.repository }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment