Fully automate CI/CD, evil multitargetting
This commit is contained in:
parent
a8a1f64705
commit
385c50a1d7
7 changed files with 159 additions and 188 deletions
76
.forgejo/workflows/syncandrelease.yml
Normal file
76
.forgejo/workflows/syncandrelease.yml
Normal file
|
@ -0,0 +1,76 @@
|
|||
name: Sync
|
||||
|
||||
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 forgejo-cli
|
||||
run: |
|
||||
wget https://codeberg.org/Cyborus/forgejo-cli/releases/download/v0.2.0/forgejo-cli-linux.gz -O fj.gz
|
||||
gunzip fj.gz
|
||||
mv fj /usr/local/bin/fj
|
||||
chmod +x /usr/local/bin/fj
|
||||
|
||||
- name: Pull Newest Jecs
|
||||
run: lune run pull.luau ${{ secrets.githubtoken }}
|
||||
|
||||
- name: Authorize
|
||||
run: pesde auth login --token "${{ secrets.pesde_auth_token }}"
|
||||
|
||||
- name: Publish Luau Target
|
||||
run: pesde publish -y
|
||||
|
||||
- name: Manifest Switcharoo
|
||||
run: |
|
||||
mv pesde.toml pesde-luau.toml
|
||||
mv pesde-rbx.toml pesde.toml
|
||||
|
||||
- name: Publish Roblox Target
|
||||
run: pesde publish -y
|
||||
|
||||
- name: Manifest Switcharoo
|
||||
run: |
|
||||
mv pesde.toml pesde-rbx.toml
|
||||
mv pesde-luau.toml pesde.toml
|
||||
|
||||
- name: Read Jecs Version
|
||||
id: read_jecs_version
|
||||
run: |
|
||||
version=$(lune run read_version | tr '\n' ' ')
|
||||
echo "JECS_VERSION=$version" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: 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/update-jecs
|
||||
commit-message: Sync to upstream Jecs ${{ steps.read_jecs_version.outputs.JECS_VERSION }}
|
||||
base: main
|
||||
token: ${{ secrets.privileged_forgejo_token }}
|
||||
|
||||
- name: Merge Pull Request
|
||||
shell: bash
|
||||
run: |
|
||||
if [ ! -z "${{ steps.create_pull_request.outputs.pull-request-number }}" ]; then
|
||||
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 }}"
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue