Skip to content

Remove temporal testing code #20

Remove temporal testing code

Remove temporal testing code #20

name: πŸ“°β„οΈ
on:
push:
branches: [main]
paths:
- '.github/workflows/notify-nixpkgs-news.yml'
pull_request:
paths:
- '.github/workflows/notify-nixpkgs-news.yml'
schedule:
# Every 3rd hour
# https://crontab.guru/#0_*/3_*_*_*
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
- cron: '0 */3 * * *'
workflow_dispatch:
jobs:
detect:
runs-on: ubuntu-24.04
outputs:
GH-902: ${{ steps.find.outputs.GH-902 }}
steps:
- uses: actions/checkout@v4
with:
repository: 'NixOS/nixpkgs'
ref: nixos-unstable
- name: Detect
id: find
run: |
set +e # Avoid grep error for not found
git grep --quiet --fixed-string -e 'platforms = lib.platforms.linux ++ lib.platforms.darwin' pkgs/by-name/ze/zed-editor/package.nix
result_902=$?
case "$result_902" in
0)
echo 'GH-902=true' | tee --append "$GITHUB_OUTPUT"
;;
1)
echo 'GH-902 related commit is not yet merged'
;;
*)
exit "$result_902"
;;
esac
notify:
needs: [detect]
env:
GH_TOKEN: ${{ github.token }}
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4 # Required git to enable gh
- name: Notify with issue comment
run: |
set -x
if [[ '${{ needs.detect.outputs.GH-902 }}' == 'true' ]]; then
gh issue comment '902' --body "πŸ€–(GH-846): https://github.com/NixOS/nixpkgs/tree/nixos-unstable looks like merged https://github.com/NixOS/nixpkgs/commit/67d8538ef6a8b6933de55c09dfcad679a5618868"
fi