diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index be088035..e14f159a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -43,19 +43,25 @@ jobs: name: Release runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v1 - - name: Available platforms - run: echo ${{ steps.buildx.outputs.platforms }} - - name: Docker Login - run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} - - name: Run Buildx - run: make publish + - name: Docker meta + id: meta + uses: crazy-max/ghaction-docker-meta@v2 + with: + images: amir20/dozzle + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Build and push + uses: docker/build-push-action@v2 + with: + context: . + push: true + platforms: linux/amd64,linux/arm/v7,linux/arm64/v8 + tags: ${{ steps.meta.outputs.tags }} + cache-from: type=gha + cache-to: type=gha git-release: needs: [buildx] name: Github Release diff --git a/Makefile b/Makefile index da8e7c92..3dec8327 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,3 @@ -TAG := $(shell git describe --tags) -PLATFROMS := linux/amd64,linux/arm/v7,linux/arm64/v8 - - -.PHONY: publish -publish: - docker buildx build --build-arg TAG=$(TAG) --platform $(PLATFROMS) -t amir20/dozzle:latest -t amir20/dozzle:$(TAG) --push . - .PHONY: clean clean: @rm -rf static