everyday-birthday #1785
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: everyday-birthday | |
on: | |
schedule: | |
- cron: "1 15 * * *" | |
workflow_dispatch: {} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
- name: yarn install | |
run: yarn install | |
- name: disable Ubuntu's security feature | |
run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns | |
- name: run (retry at most 3 times including 1st try) | |
run: yarn index || (sleep 60 && yarn index) || (sleep 60 && yarn index) | |
env: | |
TWITTER_ID: ${{ secrets.TWITTER_ID }} | |
PASSWORD: ${{ secrets.PASSWORD }} | |
YEAR: ${{ secrets.YEAR }} | |
MAIL: ${{ secrets.MAIL }} | |
TOTP_SECRET: ${{ secrets.TOTP_SECRET }} | |
- name: Setup a-know/pi | |
uses: peaceiris/actions-pixela@v2 | |
with: | |
pi_version: '1.2.0' | |
- name: Increment | |
env: | |
PIXELA_USER_TOKEN: ${{ secrets.PIXELA_USER_TOKEN }} | |
run: | | |
pi pixel increment -u gecko655 -g birthdays | |
- name: Slack Notification on Failure | |
uses: rtCamp/[email protected] | |
if: failure() | |
env: | |
SLACK_CHANNEL: general | |
SLACK_MESSAGE: Failed to make today as birthday | |
SLACK_COLOR: danger | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} |