jecs-nightly/.forgejo/workflows/release.yml
2025-03-02 05:07:57 +01:00

55 lines
1.8 KiB
YAML

name: Release
on:
workflow_dispatch:
schedule:
- cron: "10 0 * * *" # Runs at 00:10 UTC every day
jobs:
sync:
name: Sync
runs-on: docker
container:
image: ghcr.io/catthehacker/ubuntu:act-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Rokit
uses: https://github.com/CompeyDev/setup-rokit@v0.1.2
with:
token: ${{ secrets.githubtoken }}
- name: Install fj
run: |
wget https://codeberg.org/Cyborus/forgejo-cli/releases/download/v0.2.0/forgejo-cli-linux.gz -O fj.tar.gz
gunzip fj.tar.gz
mv fj /usr/local/bin/fj
chmod +x /usr/local/bin/fj
- name: Sync & Release
run: lune run src/init
- name: Read Jecs Version
id: read_jecs_version
run: |
version=$(lune run src/read_version | tr '\n' ' ')
echo "JECS_VERSION=$version" >> $GITHUB_OUTPUT
- name: Create Pull Request
id: create_pull_request
uses: https://git.devmarked.win/actions/create-pull-request@7174d368c2e4450dea17b297819eb28ae93ee645
with:
title: Sync to upstream Jecs ${{ steps.read_jecs_version.outputs.JECS_VERSION }}
body: |
Sync to upstream Jecs ${{ steps.read_jecs_version.outputs.JECS_VERSION }}
- This pull request is **auto-generated**
branch: auto/synchronize
commit-message: Sync to upstream Jecs ${{ steps.read_jecs_version.outputs.JECS_VERSION }}
base: main
token: ${{ secrets.privileged_forgejo_token }}
- name: Merge Pull Request
run: |
fj --host git.devmarked.win auth add-key marked ${{ secrets.privileged_forgejo_token }}
fj --host git.devmarked.win pr merge --method squash "${{ steps.create_pull_request.outputs.pull-request-number }}"