-
Notifications
You must be signed in to change notification settings - Fork 6
37 lines (33 loc) · 1.24 KB
/
bump.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Bump
on:
workflow_dispatch:
schedule:
- cron: 0 6 * * *
jobs:
bump-pixi:
name: Reference latest Pixi version in README
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Assert latest pixi version is mentioned in README
id: bump
run: |
set -euo pipefail
latest_version="$(gh repo view --json latestRelease prefix-dev/pixi | jq -r '.latestRelease.tagName')"
echo latest-version=$latest_version >> $GITHUB_OUTPUT
latest_version_no_v=${latest_version#v}
sed -i "s/ARG PIXI_VERSION=.*/ARG PIXI_VERSION=$latest_version_no_v/" Dockerfile
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create pull request
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c
if: github.ref_name == 'main'
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Bump pixi version to ${{ steps.bump.outputs.latest-version }}
title: Bump pixi version to ${{ steps.bump.outputs.latest-version }}
labels: enhancement
branch: bump-pixi-${{ steps.bump.outputs.latest-version }}