Skip to content

Commit

Permalink
w/ alt out
Browse files Browse the repository at this point in the history
  • Loading branch information
mbround18 committed Dec 14, 2023
1 parent 4051f5f commit c2313f8
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 10 deletions.
1 change: 0 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# v1.5.0 (Sat Mar 18 2023)



---

# v1.4.0 (Mon Jan 30 2023)
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

This is an action wrapping the auto binary for GitHub Action usage.

[if you would like to learn more about the Auto cli please click here!](https://intuit.github.io/auto/docs)
[if you would like to learn more about the Auto cli, please click here!](https://intuit.github.io/auto/docs)

Disclaimer

All work and credit goes to the original creators of the auto project. This is merly a little bit of shell code that installs it from their github repo and adds it to path. Any issues with the action please file them here but any issues with trunk itself please log them on their github repo.
All work and credit go to the original creators of the auto project.
This is merely a little bit of shell code that installs it from their GitHub repo and adds it to a path.
Any issues with the action please file them here, but any issues with trunk itself please log them on their GitHub repo.

[Having trunk issues or questions? Click here to navigate to auto by Intuit's github repo.](https://intuit.github.io/auto/docs)
[Having trunk issues or questions? Click here to navigate to auto by Intuits GitHub repo.](https://intuit.github.io/auto/docs)

## Usage

Expand All @@ -22,13 +24,13 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # <- Suggested to get all tags
token: ${{ secrets.GH_TOKEN }} # <- This is required

- name: release
uses: mbround18/auto@v1.1.0
uses: mbround18/auto@v1.5.0
with:
token: ${{ secrets.GH_TOKEN }} # <- This is for auto
```
8 changes: 7 additions & 1 deletion scripts/exec_auto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
echo "::group::Run Auto"
set -o pipefail

OUTPUT_FILE="/tmp/${GITHUB_RUN_ID:-"unknown"}-auto.out"
TMP_DIRECTORY="${GITHUB_ACTION_PATH}/.tmp"
OUTPUT_FILE="${TMP_DIRECTORY}/${GITHUB_RUN_ID:-"unknown"}-auto.out"
echo "OUTPUT_FILE=${OUTPUT_FILE}"

if ! [ -d "${TMP_DIRECTORY}" ]; then
mkdir -p "${TMP_DIRECTORY}"
fi

eval "auto ${1}" 2>&1 | tee "${OUTPUT_FILE}"

Expand Down
6 changes: 5 additions & 1 deletion scripts/parse.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
#!/usr/bin/env bash

echo "::group::Parse Auto"
set -o pipefail
echo "Parsing auto output..."

cd "$(dirname "$0")" || exit 1

DEFAULT_FILE="/tmp/${GITHUB_RUN_ID:-"unknown"}-auto.out"

DEFAULT_FILE="${GITHUB_ACTION_PATH}/.tmp/${GITHUB_RUN_ID:-"unknown"}-auto.out"
FILE="${1:-"${DEFAULT_FILE}"}"
echo "FILE=${FILE}"

if [ -z "${FILE}" ]; then
echo "Error: $FILE is not found!"
Expand Down
5 changes: 5 additions & 0 deletions scripts/utils.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
#!/usr/bin/env sh

setup() {
echo "::group::Setup"
export BIN_PATH="${GITHUB_ACTION_PATH}/.bin"
mkdir -p "${BIN_PATH}"
echo "${BIN_PATH}" >> $GITHUB_PATH


mkdir -p "${GITHUB_ACTION_PATH}/.tmp"
echo "::endgroup::"
}

normalizePath() {
Expand Down

0 comments on commit c2313f8

Please sign in to comment.