Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/Deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Create Release
name: Create Github Release

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Release.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release
name: Autobump

on:
workflow_dispatch:
Expand Down
38 changes: 37 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,23 @@ on:

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- os: macos-latest
target: x86_64-apple-darwin
- os: macos-latest
target: aarch64-apple-darwin
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
- os: windows-latest
target: x86_64-pc-windows-msvc
- os: ubuntu-latest
target: armv7-unknown-linux-musleabihf
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -35,6 +51,16 @@ jobs:

- run: echo "${{ steps.cog-changelog.outputs.stdout }}"

- uses: ./cocogitto-action
id: invalid-step
with:
command: invalid
continue-on-error: true

- name: Assert action errored
if: steps.invalid-step.outcome == 'failure'
run: echo "Action errored as expected"

test-container:
runs-on: ubuntu-latest
container:
Expand Down Expand Up @@ -65,3 +91,13 @@ jobs:
command: changelog

- run: echo "${{ steps.cog-changelog.outputs.stdout }}"

- uses: ./cocogitto-action
id: invalid-step
with:
command: invalid
continue-on-error: true

- name: Assert action errored
if: steps.invalid-step.outcome == 'failure'
run: echo "Action errored as expected"
3 changes: 3 additions & 0 deletions cog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ fi

echo "Running command: cog $COMMAND $ARGS"
stdout="$(cog $COMMAND $ARGS 2>&1)"
if [ $? -ne 0 ]; then
exit 1
fi
echo $stdout
echo "stdout<<EOF" >> "$GITHUB_OUTPUT"
echo "$stdout" >> "$GITHUB_OUTPUT"
Expand Down
12 changes: 8 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@

#!/bin/sh

CUR_DIR=$(pwd)
VERSION=6.3.0
VERSION=6.4.0
BIN_DIR="$HOME/.local/bin"

PLATFORM=$(uname -s | tr '[:upper:]' '[:lower:]')
Expand All @@ -12,7 +11,7 @@ case $PLATFORM in
linux|darwin|mingw*)
case $ARCH in
x86_64|amd64) ARCH="x86_64" ;;
aarch64) ARCH="aarch64" ;;
aarch64|arm64) ARCH="aarch64" ;;
armv7l) ARCH="armv7" ;;
*) echo "Unsupported architecture: $ARCH"; exit 1 ;;
esac
Expand All @@ -35,9 +34,14 @@ case $PLATFORM in
esac

TAR="cocogitto-$VERSION-$ARCH-$PLATFORM.tar.gz"
echo "Downloading cocogitto version $VERSION for $ARCH-$PLATFORM from https://github.com/cocogitto/cocogitto/releases/download/$VERSION/$TAR"

mkdir -p "$BIN_DIR"
cd "$BIN_DIR" || exit
curl -OL https://github.com/cocogitto/cocogitto/releases/download/"$VERSION"/"$TAR"
tar --strip-components=1 -xzf $TAR "$ARCH-$PLATFORM/cog"
if [ "$PLATFORM" = "pc-windows-msvc" ]; then
tar --strip-components=1 -xzf $TAR "$ARCH-$PLATFORM/cog.exe"
else
tar --strip-components=1 -xzf $TAR "$ARCH-$PLATFORM/cog"
fi
cd "$CUR_DIR" || exit
Loading