Skip to content

Instantly share code, notes, and snippets.

@b1a9id

b1a9id/upload.yml Secret

Last active Apr 19, 2021
Embed
What would you like to do?
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