Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMMcLean committed Apr 11, 2024
2 parents 4636bb5 + 1c8340b commit bbab75d
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 3 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/pkl-update.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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN curl -L https://download.swift.org/swift-5.10-release/ubuntu2204/swift-5.10-
tar xzf swift.tar.gz && \
mv swift-5.10-RELEASE-ubuntu22.04 /usr/share/swift

RUN curl -L -o /pkl https://github.com/apple/pkl/releases/download/0.25.2/pkl-linux-amd64 && \
RUN curl -L -o /pkl https://github.com/apple/pkl/releases/download/0.25.3/pkl-linux-amd64 && \
chmod +x /pkl && \
mv pkl /usr/share/swift/usr/bin/pkl

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PklSwift Action

Generates swift source code for a Pkl model. Based on version 0.25.2 of the Pkl tool/lang.
Generates swift source code for a Pkl model. Based on version 0.25.3 of the Pkl tool/lang.

## Inputs

Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: 'Pkl Swift'
author: 'Emily McLean'
description: 'Generates swift source code for a Pkl model. Based on version 0.25.2 of the Pkl tool/lang.'
description: 'Generates swift source code for a Pkl model. Based on version 0.25.3 of the Pkl tool/lang.'
inputs:
input-file:
description: 'The Pkl file to process'
Expand Down

0 comments on commit bbab75d

Please sign in to comment.