Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@b1a9id
Last active April 19, 2021 12:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save b1a9id/56b5e5834c7d9b99cadab8d0e89533cf to your computer and use it in GitHub Desktop.
Save b1a9id/56b5e5834c7d9b99cadab8d0e89533cf to your computer and use it in GitHub Desktop.
GitHub Actionsの実行ログをS3にアップロードするワークフロー
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