Build MeepMeep #3
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: Build MeepMeep | |
on: | |
pull_request: | |
types: | |
- opened | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
- name: Build MeepMeep | |
run: ./gradlew --no-daemon build | |
- name: Test MeepMeep | |
run: ./gradlew --no-daemon test | |
- name: Report status | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
const github = require('@actions/github'); | |
const { owner, repo } = github.context.repo; | |
const pull_request = github.context.payload.pull_request; | |
if (pull_request) { | |
await github.repos.createCommitStatus({ | |
owner, | |
repo, | |
sha: pull_request.head.sha, | |
state: 'success', | |
context: 'Build MeepMeep', | |
description: 'The build succeeded!', | |
}); | |
} |