Skip to content

Commit

Permalink
Patch 1 (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Jan 1, 2025
2 parents c685e2a + 64f2723 commit 66e09b3
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 49 deletions.
49 changes: 0 additions & 49 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ on:
pull_request:
push:
branches: [master]
schedule:
- cron: "0 */2 * * *"
workflow_call:
inputs:
config-path:
Expand All @@ -22,53 +20,6 @@ on:
permissions: write-all

jobs:
auto-pull-request:
if: "${{ github.event_name == 'schedule' }}"
runs-on: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v4
with:
ref: nixos-unstable
- name: Setup git
run: |
git config --global user.name 'little fmway'
git config --global user.email 'fm18lv@gmail.com'
git remote set-url origin https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/$GITHUB_REPOSITORY
- name: Check if PR exists
id: check
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tree -a
git fetch origin
prs=$(gh pr list \
--repo "$GITHUB_REPOSITORY" \
--head 'nixos-unstable' \
--base 'master' \
--json title \
--jq 'length')
count_commit=$(git rev-list --left-right --count origin/nixos-unstable...origin/master | awk '{print $1}')
if (( prs > 0 )) || (( count_commit < 1 )); then
echo "skip=true" >> "$GITHUB_OUTPUT"
fi
- name: Create pull request
if: '!steps.check.outputs.skip'
env:
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
gh pr create --title "Merge from nixos-unstable" --body "" -l "automated"
- uses: DeterminateSystems/magic-nix-cache-action@main
with:
use-flakehub: false
- uses: cachix/cachix-action@master
with:
name: fmcachix
# If you chose API tokens for write access OR if you have a private cache
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix build .#llvm --verbose
- run: nix-collect-garbage -d
wasmer:
if: "${{ github.event_name == 'pull_request' }}"
runs-on: ubuntu-latest
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Auto Pull Request
on:
schedule:
- cron: "0 */2 * * *"

permissions: write-all

jobs:
auto-pull-request:
runs-on: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v4
with:
ref: nixos-unstable
- name: Setup git
run: |
git config --global user.name 'little fmway'
git config --global user.email 'fm18lv@gmail.com'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
- name: Check if PR exists
id: check
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tree -a
git fetch origin
prs=$(gh pr list \
--repo "$GITHUB_REPOSITORY" \
--head 'nixos-unstable' \
--base 'master' \
--json title \
--jq 'length')
count_commit=$(git rev-list --left-right --count origin/nixos-unstable...origin/master | awk '{print $1}')
if (( prs > 0 )) || (( count_commit < 1 )); then
echo "skip=true" >> "$GITHUB_OUTPUT"
fi
- name: Create pull request
if: '!steps.check.outputs.skip'
env:
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
gh pr create --title "Merge from nixos-unstable" --body "" -l "automated"

0 comments on commit 66e09b3

Please sign in to comment.