Skip to content

Friend

Friend #92

Workflow file for this run

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Go
on:
workflow_dispatch:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
environment: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22.0'
- name: Test
env:
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
run: make test
build_and_publish:
#needs: test
environment: deploy
if: github.ref == 'refs/heads/main' && success()
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Log in to Docker Hub
run: echo ${{ secrets.DOCKER_REGISTRY_PWD }} | docker login registry.nccupass.com --username ${{ secrets.DOCKER_REGISTRY_USER }} --password-stdin
- name: Build and push Docker image
run: make docker_push