Skip to content

Commit

Permalink
ci(sync-upstream): fix missing env (#137)
Browse files Browse the repository at this point in the history
chore: cat final update result

ci: adjust build test seq
  • Loading branch information
oluceps authored Dec 23, 2024
1 parent dab4f79 commit 8c93523
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/sync-upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,26 +74,28 @@ jobs:
git checkout -b sync-target
git push -u origin sync-target
- name: Build
run: |
#!/usr/bin/env bash
set -exuo pipefail
nix build .#${{ inputs.project }}-${{ inputs.suffix }}
- name: Create Pull Request
uses: actions/github-script@main
with:
github-token: ${{ steps.generate_token.outputs.token }}
script: |
const { PROJECT, SUFFIX, REVISION } = process.env
const { data: pull_request } = await github.rest.pulls.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: `chore(${project}): sync to refs/head/main`,
body: `This PR merges the \`${project}-${suffix}\` latest update from upstream.`,
title: `chore(${PROJECT}): sync to ${REVISION || "refs/head/main"}`,
body: `This PR merges the ${PROJECT}-${SUFFIX} latest update from upstream.`,
head: 'sync-target',
base: 'main',
});
console.log(`Created pull request ${pull_request.number}`);
env:
PROJECT: ${{ inputs.project }}
SUFFIX: ${{ inputs.suffix }}

- name: Build
run: |
#!/usr/bin/env bash
set -exuo pipefail
nix build .#${{ inputs.project }}-${{ inputs.suffix }}
REVISION: ${{ inputs.revision }}
1 change: 1 addition & 0 deletions main.nu
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,5 @@ def "main sync" [

log info "save final file"
$metadata | save ./metadata.json -f
cat ./metadata.json
}

0 comments on commit 8c93523

Please sign in to comment.