From 4bbafb2a6f1a9482019f1a9f43a9b46a320ac313 Mon Sep 17 00:00:00 2001 From: David Herman Date: Sun, 14 Apr 2024 16:37:46 -0700 Subject: [PATCH] tee all the GITHUB_OUTPUT for simple diagnostics --- pkgs/create-neon/data/templates/ci/github/build.yml.hbs | 6 +++--- pkgs/create-neon/data/templates/ci/github/comments.yml.hbs | 2 +- pkgs/create-neon/data/templates/ci/github/release.yml.hbs | 6 +++--- pkgs/create-neon/data/templates/ci/github/setup.yml.hbs | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/create-neon/data/templates/ci/github/build.yml.hbs b/pkgs/create-neon/data/templates/ci/github/build.yml.hbs index ccd897301..0cec92770 100644 --- a/pkgs/create-neon/data/templates/ci/github/build.yml.hbs +++ b/pkgs/create-neon/data/templates/ci/github/build.yml.hbs @@ -46,7 +46,7 @@ jobs: - name: Look Up Matrix Data id: matrixData shell: bash - run: echo "json=$(npx neon ci github | jq -rc)" >> "$GITHUB_OUTPUT" + run: echo "json=$(npx neon ci github | jq -rc)" | tee -a $GITHUB_OUTPUT - name: Compute Matrix id: matrix uses: actions/github-script@{{versions.actions.githubScript}} @@ -104,7 +104,7 @@ jobs: shell: bash run: | mkdir -p dist - echo filename=$(basename $(npm pack ./platforms/{{#$}} matrix.cfg.platform {{/$}} --pack-destination=./dist --json | jq -r '.[0].filename')) >> $GITHUB_OUTPUT + echo filename=$(basename $(npm pack ./platforms/{{#$}} matrix.cfg.platform {{/$}} --pack-destination=./dist --json | jq -r '.[0].filename')) | tee -a $GITHUB_OUTPUT - name: Release if: {{#$}} inputs.github-release {{/$}} uses: softprops/action-gh-release@{{versions.actions.ghRelease}} @@ -131,7 +131,7 @@ jobs: shell: bash run: | mkdir -p dist - echo "filename=$(npm pack --pack-destination=./dist)" >> $GITHUB_OUTPUT + echo "filename=$(npm pack --pack-destination=./dist)" | tee -a $GITHUB_OUTPUT - name: Release if: {{#$}} inputs.github-release {{/$}} uses: softprops/action-gh-release@{{versions.actions.ghRelease}} diff --git a/pkgs/create-neon/data/templates/ci/github/comments.yml.hbs b/pkgs/create-neon/data/templates/ci/github/comments.yml.hbs index 1605098a3..039ac5e63 100644 --- a/pkgs/create-neon/data/templates/ci/github/comments.yml.hbs +++ b/pkgs/create-neon/data/templates/ci/github/comments.yml.hbs @@ -22,7 +22,7 @@ jobs: if: {{#$}} github.event.issue.pull_request {{/$}} id: pr-ref shell: bash - run: echo "branch=$(gh pr view $PR_NO --repo $REPO --json headRefName --jq '.headRefName')" >> "$GITHUB_OUTPUT" + run: echo "branch=$(gh pr view $PR_NO --repo $REPO --json headRefName --jq '.headRefName')" | tee -a $GITHUB_OUTPUT env: REPO: {{#$}} github.repository {{/$}} PR_NO: {{#$}} github.event.issue.number {{/$}} diff --git a/pkgs/create-neon/data/templates/ci/github/release.yml.hbs b/pkgs/create-neon/data/templates/ci/github/release.yml.hbs index 48fcdb1f1..7769ff023 100644 --- a/pkgs/create-neon/data/templates/ci/github/release.yml.hbs +++ b/pkgs/create-neon/data/templates/ci/github/release.yml.hbs @@ -53,7 +53,7 @@ jobs: name: Validate Dry Run Event if: {{#$}} inputs.dryrun {{/$}} shell: bash - run: echo dryrun=true >> "$GITHUB_OUTPUT" + run: echo dryrun=true | tee -a $GITHUB_OUTPUT - id: publish name: Validate Publish Event if: {{#$}} !inputs.dryrun {{/$}} @@ -71,7 +71,7 @@ jobs: echo "::error::See https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions for info about how to store GitHub repo secrets." exit 1 fi - echo publish=true >> "$GITHUB_OUTPUT" + echo publish=true | tee -a $GITHUB_OUTPUT - name: Checkout Code uses: actions/checkout@{{versions.actions.checkout}} - name: Setup Neon Environment @@ -86,7 +86,7 @@ jobs: git config --global user.email $ACTIONS_EMAIL npm version -m 'v%s' '{{#$}} (inputs.version == 'custom' && inputs.custom) || inputs.version {{/$}}' git push --follow-tags - echo tag=$(git describe --abbrev=0) >> "$GITHUB_OUTPUT" + echo tag=$(git describe --abbrev=0) | tee -a $GITHUB_OUTPUT build: name: Build diff --git a/pkgs/create-neon/data/templates/ci/github/setup.yml.hbs b/pkgs/create-neon/data/templates/ci/github/setup.yml.hbs index ddc15631f..3f8ccced0 100644 --- a/pkgs/create-neon/data/templates/ci/github/setup.yml.hbs +++ b/pkgs/create-neon/data/templates/ci/github/setup.yml.hbs @@ -49,7 +49,7 @@ runs: if: {{#$}} inputs['use-rust'] == 'true' {{/$}} id: target shell: bash - run: echo target=$(npx neon list-platforms | jq -r '.["{{#$}} inputs.platform {{/$}}"]') >> $GITHUB_OUTPUT + run: echo target=$(npx neon list-platforms | jq -r '.["{{#$}} inputs.platform {{/$}}"]') | tee -a $GITHUB_OUTPUT working-directory: {{#$}} inputs.workspace {{/$}} - name: Install Rust if: {{#$}} inputs['use-rust'] == 'true' {{/$}}