Skip to content

Commit

Permalink
GA Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
lbeckman314 committed Sep 20, 2024
1 parent d3487a6 commit 80dd0a1
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 17 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: Funnel Build and Cache

on:
push:
workflow_call:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Set up Go 1.x
uses: actions/setup-go@v5
Expand All @@ -20,15 +21,19 @@ jobs:
with:
path: |
~/go/pkg/mod
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}-${{ github.ref }}
restore-keys: |
${{ runner.os }}-go-mod-${{ github.ref }}
${{ runner.os }}-go-mod-
- name: Cache Funnel binary
uses: actions/cache@v3
with:
path: ./funnel # Path to the Funnel executable
key: ${{ runner.os }}-funnel-bin-${{ hashFiles('**/go.sum') }}
path: ./funnel
key: ${{ runner.os }}-funnel-bin-${{ hashFiles('**/go.sum') }}-${{ github.ref }}
restore-keys: |
${{ runner.os }}-funnel-bin-${{ github.ref }}
${{ runner.os }}-funnel-bin-
- name: Build Funnel (only if cache doesn't exist)
run: |
Expand All @@ -40,7 +45,7 @@ jobs:
uses: actions/cache@v3
with:
path: funnel/
key: ${{ runner.os }}-funnel-bin-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-funnel-bin-${{ hashFiles('**/go.sum') }}-${{ github.ref }}

- name: Upload Funnel binary as artifact (optional)
uses: actions/upload-artifact@v4
Expand Down
26 changes: 14 additions & 12 deletions .github/workflows/example.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
name: Funnel Use Workflow

on:
workflow_run:
workflows: ["Funnel Build and Cache"] # Name of the build workflow
types:
- completed

push:
branches:
- '**' # Triggers on all branches
pull_request:
branches:
- '**'

jobs:
build:
uses: ./.github/workflows/build.yml # use the callable tests job to run tests

use-funnel:
runs-on: ubuntu-latest

Expand All @@ -23,17 +28,14 @@ jobs:
uses: actions/cache@v3
with:
path: funnel/
key: ${{ runner.os }}-funnel-bin-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-funnel-bin-${{ hashFiles('**/go.sum') }}-${{ github.ref }}
restore-keys: |
${{ runner.os }}-funnel-bin-${{ github.ref }}
${{ runner.os }}-funnel-bin-
- name: Use Funnel binary
run: |
if [ -f ./funnel ]; then
echo "Using cached Funnel binary"
chmod +x ./funnel
./funnel server --LocalStorage.AllowedDirs $HOME run &
else
echo "Funnel binary not found. Exiting."
exit 1
fi
./funnel version

0 comments on commit 80dd0a1

Please sign in to comment.