Provide pr-body as output from step

This commit is contained in:
Luc Perkins 2024-06-03 14:32:30 -07:00
parent 5d674d8347
commit d3aa136776
No known key found for this signature in database
GPG key ID: 16DB1108FB591835
4 changed files with 9 additions and 2 deletions

View file

@ -154,6 +154,7 @@ runs:
echo "GIT_COMMITTER_NAME=${{ inputs.git-committer-name }}" >> $GITHUB_ENV echo "GIT_COMMITTER_NAME=${{ inputs.git-committer-name }}" >> $GITHUB_ENV
echo "GIT_COMMITTER_EMAIL=<${{ inputs.git-committer-email }}>" >> $GITHUB_ENV echo "GIT_COMMITTER_EMAIL=<${{ inputs.git-committer-email }}>" >> $GITHUB_ENV
- name: Run update-flake-lock - name: Run update-flake-lock
id: update-flake-lock
shell: bash shell: bash
run: node "$GITHUB_ACTION_PATH/dist/index.js" run: node "$GITHUB_ACTION_PATH/dist/index.js"
env: env:
@ -187,7 +188,7 @@ runs:
uses: DamianReeves/write-file-action@v1.3 uses: DamianReeves/write-file-action@v1.3
with: with:
path: pr_body.template path: pr_body.template
contents: ${{ inputs.pr-body }} contents: ${{ steps.update-flake-lock.outputs.pr-body }}
env: {} env: {}
- name: Set additional env variables (GIT_COMMIT_MESSAGE) - name: Set additional env variables (GIT_COMMIT_MESSAGE)
shell: bash shell: bash

2
dist/index.js vendored
View file

@ -95065,6 +95065,7 @@ function makeNixCommandArgs(nixOptions, flakeInputs, commitMessage) {
var DEFAULT_FLAKE_DIR = "."; var DEFAULT_FLAKE_DIR = ".";
var PR_BODY_OUTPUT_KEY = "pr-body";
var EVENT_EXECUTION_FAILURE = "execution_failure"; var EVENT_EXECUTION_FAILURE = "execution_failure";
var UpdateFlakeLockAction = class extends DetSysAction { var UpdateFlakeLockAction = class extends DetSysAction {
constructor() { constructor() {
@ -95089,6 +95090,7 @@ var UpdateFlakeLockAction = class extends DetSysAction {
for (const directory of this.flakeDirs) { for (const directory of this.flakeDirs) {
await this.updateFlakeInDirectory(directory); await this.updateFlakeInDirectory(directory);
} }
core.setOutput(PR_BODY_OUTPUT_KEY, "THIS IS JUST A TEST");
} }
// No post phase // No post phase
async post() { async post() {

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View file

@ -6,6 +6,8 @@ import * as fs from "fs";
const DEFAULT_FLAKE_DIR = "."; const DEFAULT_FLAKE_DIR = ".";
const PR_BODY_OUTPUT_KEY = "pr-body";
const EVENT_EXECUTION_FAILURE = "execution_failure"; const EVENT_EXECUTION_FAILURE = "execution_failure";
class UpdateFlakeLockAction extends DetSysAction { class UpdateFlakeLockAction extends DetSysAction {
@ -42,6 +44,8 @@ class UpdateFlakeLockAction extends DetSysAction {
for (const directory of this.flakeDirs) { for (const directory of this.flakeDirs) {
await this.updateFlakeInDirectory(directory); await this.updateFlakeInDirectory(directory);
} }
actionsCore.setOutput(PR_BODY_OUTPUT_KEY, "THIS IS JUST A TEST");
} }
// No post phase // No post phase