Files
concrete/.github/workflows/package-watcher.yaml
dependabot[bot] 6ea46d2cbe chore(deps): bump actions/checkout from 2.3.5 to 2.4.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.5 to 2.4.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](1e204e9a92...ec3a7ce113)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-08 09:56:22 +01:00

55 lines
2.2 KiB
YAML

name: Package Version Checker
on:
schedule:
# * is a special character in YAML so you have to quote this string
# At minute 0 for each hour from 8:00 to 22:00 inclusive from Monday to Friday inclusive
# Timezone is UTC, so Paris time is +2 during the summer and +1 during winter
- cron: '0 6-20 * * 1-5'
env:
ACTION_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
jobs:
check_and_notify_build:
name: Check timestamps and notify build
runs-on: ubuntu-20.04
steps:
- name: Should run
run: |
SHOULD_RUN=${{ secrets.PACKAGE_WATCHER_ENABLED }}
if [[ "${SHOULD_RUN}" == "PACKAGE_WATCHER_PREFIX_ENABLED" ]]; then
SHOULD_RUN="true"
echo "Running package watcher"
else
SHOULD_RUN="false"
echo "Won't run package watcher"
fi
echo "SHOULD_RUN=${SHOULD_RUN}" >> "$GITHUB_ENV"
- name: Checkout Code
if: ${{ fromJSON(env.SHOULD_RUN) }}
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
- name: Compare image timestamps and notify
if: ${{ fromJSON(env.SHOULD_RUN) }}
run: |
./script/actions_utils/container_timestamp_check.sh \
--base_img_url \
https://api.github.com/orgs/zama-ai/packages/container/zamalang-compiler/versions \
--env_img_url \
https://api.github.com/orgs/zama-ai/packages/container/concretefhe-env/versions \
--token ${{ secrets.BOT_TOKEN }} \
--org-repo ${{ github.repository }} \
--event-type rebuild-env-docker
- name: Send Slack Notification
if: ${{ always() && failure() }}
continue-on-error: true
uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7
env:
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
SLACK_ICON: https://pbs.twimg.com/profile_images/1274014582265298945/OjBKP9kn_400x400.png
SLACK_COLOR: ${{ job.status }}
SLACK_MESSAGE: "Package watcher finished with status ${{ job.status }} \
(${{ env.ACTION_RUN_URL }})"
SLACK_USERNAME: ${{ secrets.BOT_USERNAME }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}