Skip to content

Merge pull request #68 from qrkourier/tidy-controller-dockerfile #79

Merge pull request #68 from qrkourier/tidy-controller-dockerfile

Merge pull request #68 from qrkourier/tidy-controller-dockerfile #79

name: fablab db-creation workflow
on:
workflow_dispatch:
push:
branches:
- main
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
if: github.repository_owner == 'openziti'
steps:
- name: Checkout ziti
uses: actions/checkout@v4
- name: Install Go
id: setup-go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Install Ziti CI
uses: openziti/ziti-ci@v1
- name: Configure Git
run: |
$(go env GOPATH)/bin/ziti-ci configure-git
- name: Pull ZITI_VERSION and set as $GITHUB_ENV for use with fablab
run: |
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 ./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 ./zititest/models/db-creation
./db-creation dispose