diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..c96dc85 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,25 @@ +name: build +on: + create: + tags: + - v* + workflow_dispatch: +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Set output + id: vars + run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} + - name: Docker Setup QEMU + uses: docker/setup-qemu-action@v1.2.0 + - name: Docker Setup Buildx + uses: docker/setup-buildx-action@v1.6.0 + - name: Docker Login + uses: docker/login-action@v1.10.0 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_TOKEN }} + - name: Build Image + working-directory: python + run: docker buildx build --platform linux/amd64,linux/arm64 -t syw5141/khugpt-agent:${{ steps.vars.outputs.tag }} --push .