Files
com.cisco.PacketTracer/.github/workflows/main.yml
2022-05-08 02:16:21 +10:00

40 lines
1.3 KiB
YAML

name: Check for updates
on:
#schedule:
# https://crontab.guru/every-day-8am
#- cron: 0 8 * * *
workflow_dispatch:
jobs:
pull-request:
# https://github.com/actions/virtual-environments
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run update check
run: echo "version=$(bash check-updates.sh --version-only)" >> $GITHUB_ENV
#run: echo "::set-output name=STATUS::$(bash check-updates.sh --version-only)"
#id: update
- name: Update version number
run: |
#sed "s/PREV_RELEASE=.*/PREV_RELEASE=\"$(echo \"${{env.version}}\" | \
sed "s/PREV_RELEASE=.*/PREV_RELEASE=\"$(echo 8.2 | \
awk '{print $1}')\"/" \
check-updates.sh
- name: Open pull request
# https://docs.github.com/en/actions/learn-github-actions/expressions
if: contains(env.version, '==')
#if: contains(steps.update.outputs.STATUS, '==')
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
committer: GitHub <noreply@github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
branch: add-new-release
title: "Add new release"
body: "A new release of Packet Tracer has been detected."