From cad02ace21588e5f69e0cde80c5625da835e72ec Mon Sep 17 00:00:00 2001 From: coconut49 Date: Wed, 18 Oct 2023 13:50:37 +0800 Subject: [PATCH] Add GitHub Actions workflow to build and release Docker images --- .github/workflows/docker.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/docker.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000000..2c54c26091 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,35 @@ +name: Build Docker Images +on: + workflow_dispatch: + inputs: + tag: + description: "The tag version you want to build" +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + 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 GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: ghcr.io/${{ github.repository }} + - name: Build and release Docker images + uses: docker/build-push-action@v5 + with: + platforms: linux/386,linux/amd64,linux/arm64 + tags: | + ${{ steps.tag.outputs.latest }} + ${{ steps.tag.outputs.versioned }} + push: true \ No newline at end of file