Skip to content

fixup! test

fixup! test #134

Workflow file for this run

# SPDX-FileCopyrightText: 2023 Serokell <https://serokell.io/>

Check failure on line 1 in .github/workflows/check.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/check.yml

Invalid workflow file

Invalid `steps` value - steps should be list of `uses` or `run` items
#
# SPDX-License-Identifier: MPL-2.0
name: Nix flake check
on: push
jobs:
check-outdated:
runs-on: [self-hosted, nix]
outputs:
msg: ${{ steps.outdated.outputs.outdated }}
steps:
- uses: actions/checkout@v4
- name: check outdated packages
id: outdated
run: |
function output {
echo "outdated<<EOF" >> $GITHUB_OUTPUT
echo "Repository https://github.com/${{ github.repository }} has outdated haskell dependencies" >> $GITHUB_OUTPUT
echo "$msg" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
}
nix develop .#ci -c cabal update
trap 'output' ERR
msg=$(nix develop .#ci -c cabal outdated --exit-code)
report-outdated:
runs-on: [self-hosted, nix]
if: failure()
needs: check-outdated
steps:
steps:
- uses: actions/checkout@v4
- name: Report outdated haskell dependencies
env:
MSG: ${{needs.check-outdated.outputs.msg}}
run: |
nix develop .#ci -c curl -XPOST https://slack.com/api/chat.postMessage \
-H "Authorization: Bearer ${{ env.SLACK_TOKEN }}" \
# you can change 'libraries' to the channel dedicated to the library, if there is one
-d "channel=libraries" \
-d "text=$MSG"