From 5d9850cd451571a647e40c50230e0e03c95757bf Mon Sep 17 00:00:00 2001 From: Bulat Kurbanov Date: Tue, 16 Aug 2022 22:20:03 +0300 Subject: [PATCH] Add build workflow --- .github/workflows/build.yml | 54 +++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..20db702 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,54 @@ +name: Build docker image + +on: + push: + branches: + - 'master' + +jobs: + Build-Docker-Image: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v3 + + - + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + with: + platforms: arm64 + + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - id: repository_name + uses: ASzc/change-string-case-action@v2 + with: + string: ${{ github.repository }} + + - + name: Login to ghcr.io + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - + name: Build and push + id: docker_build + uses: docker/build-push-action@v3 + env: + IMAGE: ${{ steps.repository_name.outputs.lowercase }} + with: + push: true + platforms: linux/amd64,linux/arm64 + tags: ghcr.io/${{ env.IMAGE }}:latest + + # - + # name: Invoke deployment hook + # uses: joelwmale/webhook-action@master + # with: + # url: ${{ secrets.WEBHOOK_URL }}