Prow-CI #135
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: Prow-CI | |
on: | |
schedule: | |
- cron: '30 3 * * *' # Runs every day at 3:30 AM UTC (9 AM IST) | |
workflow_dispatch: | |
inputs: | |
channel_id: | |
description: 'Channel ID' | |
required: true | |
slack_token: | |
description: 'Slack Token' | |
required: false | |
prow_url: | |
description: 'Prow URL' | |
required: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: golang:1.20 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Setup Go environment | |
uses: actions/setup-go@v4 | |
- name: Run Test and Store Output | |
run: go run main.go prowjob periodic-report > prowjob-output.txt | |
- name: Send Slack Message | |
run: go run main.go send-slack-message -m "$(cat prowjob-output.txt)" | |
env: | |
SLACK_TOKEN: ${{ inputs.slack_token != '' && inputs.slack_token || secrets.SLACK_TOKEN }} | |
PROW_URL: ${{ inputs.prow_url != '' && inputs.prow_url || secrets.PROW_URL }} | |
CHANNEL_ID: ${{ inputs.channel_id != '' && inputs.channel_id || secrets.CHANNEL_ID }} | |