Coffee-break #1
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: Coffee-break | |
on: | |
schedule: | |
- cron: '*/5 * * * *' # This runs at 00:00 UTC on the 5th of every month | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: golang:1.20 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
with: | |
repository: 'psturc/qe-tools' | |
- name: Setup Go environment | |
uses: actions/setup-go@v4 | |
- name: Run Test and Send Slack Message | |
run: go run coffee-break/coffee.go | |
env: | |
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }} | |
HACBS_CHANNEL_ID: ${{ secrets.HACBS_CHANNEL_ID }} | |
- name: Commit and push if it's not a Pull Request | |
run: | | |
git config --global --add safe.directory /__w/qe-tools/qe-tools | |
git init /__w/qe-tools/qe-tools | |
git config user.name "GitHub Action" | |
git config user.email "action@github.com" | |
git add coffee-break/last_week.txt | |
git commit -m "Update coffee-break/last_week.txt" | |
git push origin main -f |