Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes bundle for action.yml #249

Merged
merged 5 commits into from
Oct 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ runs:
run: |
cat >>$GITHUB_ENV <<EOF
GITHUB_TOKEN=${{ github.token }}
TRUNK_LAUNCHER_QUIET=false
EOF

# First arg is field to fetch, second arg is default value or empty
Expand All @@ -146,7 +147,7 @@ runs:

# Every inputs.field should be referenced as INPUT_FIELD later in the action. This allows
# the field to be set either as an argument to the github action or via inputs.json.
if [[ "${{ inputs.check-mode }}" = "payload" ]]; then
if [[ "${{ inputs.check-mode }}" == "payload" ]]; then

INPUT_GITHUB_TOKEN=$(payload githubToken)
INPUT_TRUNK_TOKEN=$(payload trunkToken)
Expand Down Expand Up @@ -248,15 +249,15 @@ runs:
- name: Init on-demand
shell: bash
run: |
if [ ! -e .trunk/trunk.yaml ]; then
${TRUNK_PATH:-trunk} init
if [[ ! -e .trunk/trunk.yaml ]]; then
${TRUNK_PATH:-trunk} --ci init
echo "INITIALIZED_TRUNK=true" >>$GITHUB_ENV
fi

- name: Detect setup strategy
shell: bash
run: |
if [ -e .trunk/setup-ci ]; then
if [[ -e .trunk/setup-ci ]]; then
echo "INPUT_SETUP_DEPS=true" >>$GITHUB_ENV
else
mkdir -p .trunk
Expand Down Expand Up @@ -336,15 +337,15 @@ runs:
shell: bash
run: |
echo "::group::.trunk/logs/cli.log"
if [ -f .trunk/logs/cli.log ]; then
if [[ -f .trunk/logs/cli.log ]]; then
cat .trunk/logs/cli.log
else
echo ".trunk/logs/cli.log doesn't exist"
fi
echo "::endgroup::"

echo "::group::.trunk/logs/daemon.log"
if [ -f .trunk/logs/daemon.log ]; then
if [[ -f .trunk/logs/daemon.log ]]; then
cat .trunk/logs/daemon.log
else
echo ".trunk/logs/daemon.log doesn't exist"
Expand All @@ -367,7 +368,7 @@ runs:

- name: Download annotations artifact
if: inputs.post-annotations == 'true'
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
# TODO(chris): We can't use the official download artifact action yet: https://github.com/actions/download-artifact/issues/172
script: |
Expand Down
Loading