build(deps): bump golang.org/x/net from 0.17.0 to 0.23.0 (#5) #59
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: Dev-CI | |
on: | |
push: | |
branches: [ "dev" ] | |
pull_request: | |
branches: [ "dev" ] | |
env: | |
PYTHON_VERSION: 3.10.14 | |
JAVA_VERSION: 8.0.412+8 | |
RUST_VERSION: 1.60.0 | |
CC_VERSION: 11 | |
jobs: | |
test-app-job: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get Golang version | |
run: echo -n "GO_VERSION=$(grep go go.mod | head -n1 | cut -d ' ' -f 2 | tr -d '\n')" >> $GITHUB_ENV | |
- name: Setup Golang | |
uses: actions/[email protected] | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Setup Python | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Setup Java | |
uses: actions/[email protected] | |
with: | |
java-version: ${{ env.JAVA_VERSION }} | |
distribution: temurin | |
- name: Setup CC | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y gcc-${{ env.CC_VERSION }} g++-${{ env.CC_VERSION }} | |
- name: Setup Rustc | |
run: sudo apt-get install -y rustc # TODO it need to fix to specific version rustc, but compile one wasting too much time X(. | |
- name: Test code | |
run: | | |
sudo go mod tidy | |
sudo make unit-test | |
build-release-app-image-job: | |
needs: test-app-job | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Make Rootfs Before Build Image | |
run: ROOTFS_IMAGE_TAG=latest make rootfs | |
- name: Build and push | |
env: | |
image_owner: msqt | |
image_name: sb-judger | |
image_tag: dev | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: build/Dockerfile | |
tags: ${{ env.image_owner }}/${{ env.image_name }}:${{ env.image_tag }} | |
platforms: linux/amd64,linux/arm64 | |
push: true |