remove check_approve_count job in wsl workflow #244
Workflow file for this run
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: ubuntu-workflow | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- '*' | |
permissions: # limit the permissions of the GITHIUB_TOKEN to reading repository contents | |
contents: read | |
jobs: | |
build: | |
permissions: | |
actions: write # for styfle/cancel-workflow-action to cancel/stop running workflows | |
contents: read # for actions/checkout to fetch code | |
runs-on: ubuntu-latest | |
outputs: | |
build-scan-url: ${{ steps.build.outputs.build-scan-url }} | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@v2 | |
with: | |
egress-policy: audit | |
# TODO: change to 'egress-policy: block' after auditing a number of runs and updating the allowed-endpoints option accordingly | |
- name: Cancel Previous Runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: gradle/wrapper-validation-action@v1 | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- id: build | |
name: Gradle clean build | |
uses: gradle/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
HEAD_REF: ${{ github.head_ref }} | |
with: | |
arguments: "clean build" | |
publish-scan-url: | |
needs: [ build ] | |
permissions: | |
pull-requests: write # to allow creating or updating a comment | |
if: ${{ github.event_name == 'pull_request' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@v2 | |
with: | |
egress-policy: audit | |
# TODO: change to 'egress-policy: block' after auditing a number of runs and updating the allowed-endpoints option accordingly | |
- name: Get current time | |
uses: 1466587594/get-current-time@v2 | |
id: current-time | |
with: | |
format: 'YYYY-MM-DD HH:mm:ss' | |
utcOffset: "+00:00" | |
- name: Find Comment | |
uses: peter-evans/find-comment@v2 | |
id: fc | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
comment-author: 'github-actions[bot]' | |
body-includes: Buildscan url for ubuntu-workflow run | |
- name: Create comment | |
if: ${{ steps.fc.outputs.comment-id == 0 }} | |
uses: peter-evans/create-or-update-comment@v3 | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
body: | | |
**Timestamp:** ${{ steps.current-time.outputs.formattedTime }} | |
**Buildscan url for ubuntu-workflow run [${{ github.run_id }}](https://github.com/Flank/flank/actions/runs/${{ github.run_id }})** | |
${{ needs.build.outputs.build-scan-url }} | |
- name: Update comment | |
if: ${{ steps.fc.outputs.comment-id != 0 }} | |
uses: peter-evans/create-or-update-comment@v3 | |
with: | |
comment-id: ${{ steps.fc.outputs.comment-id }} | |
edit-mode: replace | |
body: | | |
**Timestamp:** ${{ steps.current-time.outputs.formattedTime }} | |
**Buildscan url for ubuntu-workflow run [${{ github.run_id }}](https://github.com/Flank/flank/actions/runs/${{ github.run_id }})** | |
${{ needs.build.outputs.build-scan-url }} |