Merge pull request #4 from jrione/feat/login #6
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: "Go CI" | |
on: | |
push: | |
branches: | |
- "main" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.21.4' | |
- name: Build | |
run: go build -v -o ./gin-crud | |
- name: Inject Config | |
run: | | |
cat config.example.json | jq \ | |
--arg username "${{ secrets.USERNAME }}" \ | |
--arg password "${{ secrets.PASSWORD }}" \ | |
--arg hostname "${{ secrets.HOSTNAME }}" \ | |
--arg port "${{ secrets.PORT }}" \ | |
--arg name "${{ secrets.NAME }}" \ | |
'(. | .database.username = $username | .database.password = $password | .database.hostname = $hostname | .database.port = $port | .database.name = $name )' | tee config.json | |
- name: Test | |
run: | | |
./gin-crud & | |
curl -I localhost:6969/ | grep 404 | |