update go mod [bump] #55
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: Bump | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
jobs: | |
bump: | |
if: "! contains(github.event.head_commit.message, '[skip ci]')" | |
runs-on: ubuntu-latest | |
outputs: | |
new_tag: ${{ steps.tag_version.outputs.new_tag }} | |
new_version: ${{ steps.tag_version.outputs.new_version }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Bump version and push tag | |
id: tag_version | |
uses: mathieudutour/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
custom_tag: ${{ github.event.inputs.tag }} | |
build-test-push: | |
# runs-on: ubuntu-latest | |
if: "! contains(github.event.head_commit.message, '[no build]')" | |
runs-on: [self-hosted, Linux] | |
needs: [bump] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: "1.20" | |
- name: Set up Node 16 | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '16.x' | |
- name: Cache NPM | |
id: cache-npm | |
uses: actions/cache@v2 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Pull & build dbnet-parser | |
run: | | |
npm install -g yarn | |
# Build dbnet-parser | |
cd .. && rm -rf dbnet-parser | |
git clone [email protected]:dbnet-io/dbnet-parser.git | |
cd dbnet-parser && yarn && yarn build && cd - | |
cd dbnet | |
- name: Build CLI App | |
run: | | |
go mod edit -dropreplace='github.com/flarco/g' go.mod | |
go mod edit -dropreplace='github.com/flarco/dbio' go.mod | |
go mod edit -dropreplace='github.com/dbrest-io/dbrest' go.mod | |
go mod edit -dropreplace='github.com/slingdata-io/sling-cli' go.mod | |
go mod tidy | |
bash build.sh | |
- name: Test CLI | |
env: | |
ENVKEY: ${{ secrets.ENVKEY }} | |
run: | | |
/__/bin/envkey-source -f --dot-env > .env | |
# bash scripts/test.sh | |
- name: Push Docker Test Image | |
env: | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
run: | | |
echo "$DOCKER_PASSWORD" | docker login -u dbnetio --password-stdin | |
docker build -f docker/Dockerfile -t dbnetio/dbnet:test . | |
docker push dbnetio/dbnet:test | |
deploy-testing: | |
timeout-minutes: 5 | |
runs-on: self-hosted | |
needs: [build-test-push] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Deploy to Testing | |
env: | |
SSH_SERVER_URL: ${{ secrets.SSH_SERVER_URL }} | |
run: bash scripts/deploy.testing.sh | |
test-frontend: | |
# runs-on: ubuntu-latest | |
if: "! contains(github.event.head_commit.message, '[no test]')" | |
runs-on: [self-hosted, Linux] | |
needs: [deploy-testing] | |
steps: | |
- name: Test Frontend | |
uses: omairvaiyani/ghact-uilicious@v1 | |
with: | |
access-key: ${{ secrets.UILICIOUS_ACCESS_KEY }} | |
project: dbNet | |
tests: "dbnet_test" |