Added Binary location and different Terraform resource #36
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: fablab db-creation workflow | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- '*' | |
env: | |
GOFLAGS: "-trimpath" | |
GOX_OUTPUT: "release/{{.Arch}}/{{.OS}}/{{.Dir}}" | |
GOX_TEST_OUTPUT: "test/{{.Arch}}/{{.OS}}/bin/{{.Dir}}" | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_DEFAULT_REGION: "us-east-1" | |
gh_ci_key: ${{ secrets.GH_CI_KEY }} | |
S3_KEY: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
S3_SECRET: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
jobs: | |
build: | |
name: Build and Run | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout ziti | |
uses: actions/checkout@v3 | |
with: | |
path: ziti | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '1.20.x' | |
- name: Install Ziti CI | |
uses: openziti/ziti-ci@v1 | |
- name: Configure Git | |
run: | | |
cd ziti | |
$(go env GOPATH)/bin/ziti-ci configure-git | |
- name: Pull ZITI_VERSION and set as $GITHUB_ENV for use with fablab | |
run: | | |
cd ziti | |
version="$($(go env GOPATH)/bin/ziti-ci -q get-current-version)" | |
echo "Ziti Version: $version" | |
echo "ZITI_VERSION=$version" >> $GITHUB_ENV | |
- name: Build and Run | |
run: | | |
cd ziti/zititest/models/db-creation | |
go build -o db-creation main.go | |
echo "ZITI_ROOT=$(go env GOPATH)/bin" >> "$GITHUB_ENV" | |
./db-creation create db-creation | |
./db-creation up | |
- name: Teardown | |
if: always() | |
run: | | |
cd ziti/zititest/models/db-creation | |
./db-creation dispose |