Skip to content

Commit

Permalink
Merge pull request #67 from remore/patch-3
Browse files Browse the repository at this point in the history
Add sample yaml GitHub Actions config for Go
  • Loading branch information
kpfleming authored Dec 20, 2024
2 parents c94a49b + a0769bd commit 69cb262
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,33 @@ jobs:
FASTLY_API_TOKEN: ${{ secrets.FASTLY_API_TOKEN }}
```

### go-based Workflow (Go)

Since you need to pick Go version equal to 1.21 or later to build your Go project with GOARCH=wasm and GOOS=wasip1 target, it is recommended to use `actions/setup-go` with the following configuration, so that you can switch to any version of Go you need;

```yml
name: Deploy Application
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Go toolchain
uses: actions/setup-go@v5
with:
go-version: "1.23"
- name: Deploy to the Compute platform
uses: fastly/compute-actions@v5
env:
FASTLY_API_TOKEN: ${{ secrets.FASTLY_API_TOKEN }}
```

### Custom Workflows

Alternatively, you can manually run the individual GitHub Actions for Compute if you want finer control over your workflow:
Expand Down

0 comments on commit 69cb262

Please sign in to comment.