Skip to content

allow manual deploy #20

allow manual deploy

allow manual deploy #20

Workflow file for this run

name: Deploy Good First Issue Bot
on:
push:
branches:
- main
tags:
- "v*"
workflow_dispatch: {}
jobs:
build:
runs-on: ubuntu-latest
env:
tinygo-dev-image-tag: sha-744574193b9e213bc2d897d5e5f02ec1c256ff7a
steps:
- uses: actions/checkout@v3
- name: setup spin
uses: fermyon/actions/spin/setup@v1
with:
github_token: ${{ github.token }}
- name: "Install Go"
uses: actions/setup-go@v3
with:
go-version: "1.20"
- name: Cache tinygo
id: cache-tinygo
uses: actions/cache@v3
env:
cache-name: cache-tinygo
with:
path: ${{ github.workspace }}/tinygo
key: tinygo-dev-${{ env.tinygo-dev-image-tag }}
# download tinygo from dev docker container to use new 'reflect' and 'encoding/json' features
- name: Download tinygo
if: ${{ steps.cache-tinygo.outputs.cache-hit != 'true' }}
env:
IMAGE_TAG: ghcr.io/tinygo-org/tinygo-dev:${{ env.tinygo-dev-image-tag }}
run: |
# download tinygo from 'dev' branch docker container
docker pull ${IMAGE_TAG}
CONTAINER=$(docker create --platform=linux/amd64 ${IMAGE_TAG})
docker cp ${CONTAINER}:/tinygo/ $GITHUB_WORKSPACE
docker rm -v ${CONTAINER}
- name: Setup tinygo
run: |
# set the tinygo root path
echo "TINYGOROOT=$GITHUB_WORKSPACE/tinygo" >> $GITHUB_ENV
# add tinygo to gopath
GOPATH=$(go env GOPATH)
cp $GITHUB_WORKSPACE/tinygo/build/* $(go env GOPATH)/bin
# debug home paths
ls -al $GITHUB_WORKSPACE
env
- name: build and deploy
uses: fermyon/actions/spin/deploy@v1
id: deploy
with:
fermyon_token: ${{ secrets.FERMYON_CLOUD_TOKEN }}
manifest_file: spin.toml
key_values: |-
twitter:consumerKey=${{ secrets.TWITTER_CONSUMER_KEY }}
twitter:consumerToken=${{ secrets.TWITTER_CONSUMER_TOKEN }}
twitter:token=${{ secrets.TWITTER_TOKEN }}
twitter:tokenSecret=${{ secrets.TWITTER_TOKEN_SECRET }}
bluesky:handle=${{ secrets.BLUESKY_HANDLE }}
bluesky:password=${{ secrets.BLUESKY_PASSWORD }}