From e0134d1f751b08fb67b15a78dcb313c2882ca8dc Mon Sep 17 00:00:00 2001 From: snail Date: Thu, 24 Oct 2024 15:39:38 +0800 Subject: [PATCH] update ci.yml --- .github/workflows/ci.yml | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8eab450..32482a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ env: jobs: - build: + build-binary: runs-on: ubuntu-latest strategy: matrix: @@ -28,6 +28,8 @@ jobs: id: vars run: | tag=`basename ${{ github.ref }}` + echo ${{ steps.vars.outputs.tag }} + pwd # golang_version=1.22 # cgo_enabled=0 @@ -43,16 +45,11 @@ jobs: export CGO_ENABLED=${{ env.CGO_ENABLED }} go build -o bbx-${GOOS}-${GOARCH} - - name: run - run: | - ls -al - tree - - - name: Upload binaries - uses: actions/upload-artifact@v4 - with: - name: bbx-${{ matrix.os }}-${{ matrix.arch }} - path: bbx-${{ matrix.os }}-${{ matrix.arch }} + # - name: Upload binaries + # uses: actions/upload-artifact@v4 + # with: + # name: bbx-${{ matrix.os }}-${{ matrix.arch }} + # path: bbx-${{ matrix.os }}-${{ matrix.arch }} - name: Release uses: softprops/action-gh-release@v1 @@ -62,9 +59,10 @@ jobs: files: | bbx-${{ matrix.os }}-${{ matrix.arch }} - - name: run - run: | - ls -al; tree + build-image: + steps: + - name: Checkout code + uses: actions/checkout@v2 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 @@ -75,11 +73,6 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: run - run: | - ls -al - tree - - name: Build and push Docker image run: | # docker buildx build --build-arg IMAGE=golang:1.22 --platform linux/amd64,linux/arm64 -t snail2sky/bbx:latest . --push