49 lines
No EOL
1.3 KiB
YAML
49 lines
No EOL
1.3 KiB
YAML
# on:
|
|
# push:
|
|
# branches:
|
|
# - dev
|
|
# - master
|
|
# tags:
|
|
# - 'v*'
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: host
|
|
steps:
|
|
- name: Checkout app
|
|
shell: bash -l {0}
|
|
uses: actions/checkout@v4
|
|
with:
|
|
path: app
|
|
- name: Test
|
|
run: go test -v ./...
|
|
working-directory: app
|
|
- name: Checkout scripts
|
|
shell: bash -l {0}
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: develop/scripts
|
|
ref: master
|
|
path: scripts
|
|
token: ${{ secrets.DEPLOY_KEY }}
|
|
- run: chmod +rwx scripts/build/build.sh
|
|
- name: Build app
|
|
run: scripts/build/build.sh
|
|
env:
|
|
BRANCH: dev
|
|
BUILD_DIR: app
|
|
BUILD_TAGS: grpc
|
|
GITHOST: ${{ vars.GITHOST }}
|
|
GITHOST_LOGIN: ${{ vars.GITHOST_LOGIN }}
|
|
GITHOST_PASSWORD: ${{ secrets.GITHOST_PASSWORD }}
|
|
- name: Login to Docker Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ vars.REGISTRY }}
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
- run: chmod +rwx scripts/build/build-docker.sh
|
|
- name: Build & Push docker
|
|
run: scripts/build/build-docker.sh
|
|
env:
|
|
REGISTRY: ${{ vars.REGISTRY }} |