Skip to content
This repository has been archived by the owner on Aug 27, 2023. It is now read-only.

Check for New Devices #640

Check for New Devices

Check for New Devices #640

name: Check for New Devices
on:
schedule:
- cron: '0 3 * * *'
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
job:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Run Generator
run: cd Generator; swift run
- name: Check for changes
run: |
# true if changes detected
isChanged=$(git diff-index --quiet HEAD -- || echo "true");
echo "IS_CHANGED=$isChanged" >> $GITHUB_ENV
if [[ $isChanged == "true" ]]; then
echo "Changes detected"
else
echo "No changes detected"
fi
- name: "Ensure package still builds"
if: ${{ env.IS_CHANGED == 'true' }}
run: swift build --target Devices
- name: "Create pull request"
if: ${{ env.IS_CHANGED == 'true' }}
uses: peter-evans/create-pull-request@v3
with:
commit-message: "Update devices (autogenerated)"
branch: "automated/update-devices"
delete-branch: true
title: "Update devices (autogenerated)"
body: ""
assignees: "ptrkstr"