re-org project structure #18
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: [ main ] | |
paths-ignore: | |
- "*.md" | |
pull_request: | |
branches: [ main ] | |
paths-ignore: | |
- "*.md" | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BUILDKIT_PROGRESS: "plain" # Full logs for CI build. | |
REGISTRY_URL: "docker.io" # docker.io or other target registry URL: where to push images to. | |
REGISTRY_SRC: "docker.io" # For BASE_NAMESPACE of images: where to pull base images from. | |
# DOCKER_REGISTRY_USERNAME and DOCKER_REGISTRY_PASSWORD is required for docker image push, they should be set in CI secrets. | |
DOCKER_REGISTRY_USERNAME: ${{ secrets.DOCKER_REGISTRY_USERNAME }} | |
DOCKER_REGISTRY_PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD }} | |
# used to sync image to mirror registry | |
DOCKER_MIRROR_REGISTRY_USERNAME: ${{ secrets.DOCKER_MIRROR_REGISTRY_USERNAME }} | |
DOCKER_MIRROR_REGISTRY_PASSWORD: ${{ secrets.DOCKER_MIRROR_REGISTRY_PASSWORD }} | |
jobs: | |
build_docker_image: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.22 | |
- uses: actions/checkout@v4 | |
- name: Build Docker | |
run: | | |
source ./tool.sh && build_image supervisord latest src/supervisord.Dockerfile && push_image | |
build_binary: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build Binary | |
run: | | |
set -eux | |
pwd && ls -alh * | |
cd src/supervisord | |
go mod tidy | |
go test -v | |
go build -v -o ../../build/ | |
cd ../../ | |
mv src/etc src/webgui ./build/ | |
ls -alh build |