-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/fix_estimateXX
- Loading branch information
Showing
149 changed files
with
26,467 additions
and
20,108 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
- "releases/v3.x" | ||
- "chore/fix-ci" | ||
pull_request: | ||
branches: | ||
- "main" | ||
- "releases/v3.x" | ||
- "chore/fix-ci" | ||
|
||
jobs: | ||
docker: | ||
runs-on: self-hosted | ||
env: | ||
DOCKER_BUILDKIT: 1 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install dependencies | ||
run: sudo apt-get update && sudo apt-get install -y jq curl git | ||
|
||
- name: Install Go | ||
run: | | ||
GO_VERSION=1.22.4 | ||
curl -LO https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz | ||
sudo tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz | ||
echo "export PATH=$PATH:/usr/local/go/bin" >> $HOME/.profile | ||
source $HOME/.profile | ||
shell: bash | ||
|
||
- name: Download Buildx with Hydrobuilder support | ||
run: | | ||
ARCH=amd64 | ||
BUILDX_URL=$(curl -s https://raw.githubusercontent.com/docker/actions-toolkit/main/.github/buildx-lab-releases.json | jq -r ".latest.assets[] | select(endswith(\"linux-$ARCH\"))") | ||
mkdir -vp ~/.docker/cli-plugins/ | ||
curl --silent -L --output ~/.docker/cli-plugins/docker-buildx $BUILDX_URL | ||
chmod a+x ~/.docker/cli-plugins/docker-buildx | ||
- name: Get version from git tags | ||
id: get_version | ||
run: echo "VERSION=v$(git describe --tags --abbrev=0 | sed 's/^v//')" >> $GITHUB_ENV | ||
|
||
- name: Log in to Docker Hub | ||
run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login --username ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin | ||
|
||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v3 | ||
with: | ||
version: "lab:latest" | ||
driver: cloud | ||
endpoint: "neutronorg/neutron" | ||
install: true | ||
|
||
# - name: Build and push | ||
# uses: docker/build-push-action@v5 | ||
# with: | ||
# context: . | ||
# file: Dockerfile.builder | ||
# tags: "${{ env.VERSION }}" | ||
# # For pull requests, export results to the build cache. | ||
# # Otherwise, push to a registry. | ||
# outputs: ${{ github.event_name == 'pull_request' && 'type=cacheonly' || 'type=registry,push=true' }} | ||
|
||
- name: Build and push Docker image | ||
env: | ||
VERSION: ${{ env.VERSION }} | ||
BUILDER: ${{ steps.buildx.outputs.name }} | ||
run: | | ||
docker buildx use $BUILDER | ||
make build-static-linux-amd64 | ||
docker tag neutron-amd64:latest neutronorg/neutron:${{ env.VERSION }} | ||
docker push neutronorg/neutron:${{ env.VERSION }} | ||
- name: Cleanup temporary container | ||
run: docker rm -f neutronbinary || true | ||
|
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
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
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
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
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
Oops, something went wrong.