--- name: push on: push: branches: - master jobs: build: container: image: focs.ji.sjtu.edu.cn:5000/gitea/runner-images:ubuntu-latest volumes: - /home/actions/.ssh:/root/.ssh steps: - name: Check out repository code uses: https://gitea.com/BoYanZh/checkout@focs - name: Setup Go 1.23.1 run: | wget -q https://studygolang.com/dl/golang/go1.23.1.linux-amd64.tar.gz rm -rf /usr/local/go tar -C /usr/local -xzf go1.23.1.linux-amd64.tar.gz rm -rf go1.23.1.linux-amd64.tar.gz echo "PATH=$PATH:/usr/local/go/bin:/root/go/bin" >> $GITHUB_ENV - name: Display Go version run: go version - name: Prepare run: | go env -w GO111MODULE=on go env -w GOPROXY=https://goproxy.io,direct chown -R root:root /root/.ssh - name: Determine build command id: build_command run: | if [[ "${{ github.event.head_commit.message }}" == *"force build"* ]]; then echo "build_command=make force-build" >> $GITHUB_ENV else echo "build_command=make build" >> $GITHUB_ENV fi - name: Build run: ${{ env.build_command }} - name: Check images run: docker images - name: Push run: make push