This repository has been archived by the owner on Apr 22, 2024. It is now read-only.
update #9616
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
# worflow to call the update.sh script and create a PR based on the changes | |
name: update | |
on: | |
schedule: | |
- cron: '*/10 * * * *' | |
workflow_dispatch: | |
jobs: | |
pre_job: | |
name: Check for New Releases | |
outputs: | |
exists: ${{ steps.check-age.outputs.exists }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: "actions/checkout@v3" | |
- name: Check For Release Age | |
id: check-age | |
run: | | |
echo ""exists=$((curl -s https://api.github.com/repos/ow-mods/ow-mod-man/releases) | jq -r '(((now - (.[0].published_at | fromdateiso8601)) / (60*60) | trunc) == 0)')"" >> $GITHUB_OUTPUT | |
- name: Result | |
id: result | |
#run: | | |
# echo "${{ steps.check-age.outputs.exists }}" | |
if: ${{ steps.check-age.outputs.exists == 'true' }} | |
run: echo "new version of the manager! 🥳" | |
update: | |
runs-on: ubuntu-latest | |
if: ${{ needs.pre_job.outputs.exists == 'true' || github.event_name != 'schedule' }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v22 | |
with: | |
nix_path: nixpkgs=channel:nixos-unstable | |
github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Update Packages | |
run: ./update.sh | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
commit-message: Package Version Update | |
title: 'Package Version Update' | |
body: > | |
This PR is auto-generated by | |
[create-pull-request](https://github.com/peter-evans/create-pull-request). | |
labels: package update, automated pr |