Skip to content

Commit

Permalink
Add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMMcLean committed Apr 11, 2024
1 parent cc93adf commit 8d00aa3
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/update-pkl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Pkl Update

on:
workflow_dispatch:
schedule:
- cron: "0 13 * * 1"

jobs:
version:
runs-on: ubuntu-latest
outputs:
current-version: ${{ env.PKL_VERSION }}
latest-version: ${{ steps.pkl-release.outputs.release }}
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: "develop"
- name: Get current Pkl version
run: |
VER=$(cat .pkl-version)
echo "PKL_VERSION=$VER" >> $GITHUB_ENV
- id: pkl-release
uses: pozetroninc/github-action-get-latest-release@master
with:
owner: apple
repo: pkl
excludes: prerelease, draft
update:
runs-on: ubuntu-latest
needs: version
if: ${{ needs.version.outputs.current-version != needs.version.outputs.latest-version }}
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: "develop"
- name: Find and Replace
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "${{ needs.version.outputs.current-version }}"
replace: "${{ needs.version.outputs.latest-version }}"
regex: false
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
branch: "update-pkl/feature/${{ needs.version.outputs.latest-version }}-pkl-lang"
title: "Update Pkl from ${{ needs.version.outputs.current-version }} to ${{ needs.version.outputs.latest-version }}"
assignees: BenMMcLean
reviewers: BenMMcLean
1 change: 1 addition & 0 deletions .pkl-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.25.3

0 comments on commit 8d00aa3

Please sign in to comment.