From d1ec37cdd68480d34219e5b66ab5f5699836ff5a Mon Sep 17 00:00:00 2001 From: Matthew Horwood Date: Thu, 26 Jan 2023 21:17:31 +0000 Subject: [PATCH 1/3] Alpine v3.17 and Github actions feat: Alpine v3.17.1 chor: update github actions --- .github/workflows/image-latest.yml | 20 +++++++++----------- .github/workflows/image-test.yml | 24 ++++++++++-------------- .github/workflows/image-version.yml | 20 +++++++++----------- Dockerfile | 2 +- 4 files changed, 29 insertions(+), 37 deletions(-) diff --git a/.github/workflows/image-latest.yml b/.github/workflows/image-latest.yml index 43a3395..ddd16e9 100644 --- a/.github/workflows/image-latest.yml +++ b/.github/workflows/image-latest.yml @@ -10,18 +10,16 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - name: install buildx - id: buildx - uses: docker/setup-buildx-action@v1 - - name: Available platforms - run: echo ${{ steps.buildx.outputs.platforms }} + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 - name: login to docker hub run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin - name: build the image - run: | - docker buildx build --push \ - --tag mhzawadi/phpmyadmin:latest \ - --platform linux/amd64,linux/arm/v7,linux/arm64 . + uses: docker/build-push-action@v3 + with: + push: true + platforms: linux/amd64,linux/arm64,linux/arm/v7 + tags: mhzawadi/phpmyadmin:latest diff --git a/.github/workflows/image-test.yml b/.github/workflows/image-test.yml index 1fe0a1d..db95e33 100644 --- a/.github/workflows/image-test.yml +++ b/.github/workflows/image-test.yml @@ -4,26 +4,22 @@ on: workflow_dispatch: push: branches-ignore: master - schedule: - # * is a special character in YAML so you have to quote this string - - cron: '5 3 * * 1' + jobs: build: runs-on: ubuntu-latest steps: - name: checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - name: install buildx - id: buildx - uses: docker/setup-buildx-action@v1 - - name: Available platforms - run: echo ${{ steps.buildx.outputs.platforms }} + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 - name: login to docker hub run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin - name: build the image - run: | - docker buildx build --push \ - --tag mhzawadi/phpmyadmin:dev \ - --platform linux/amd64,linux/arm/v7,linux/arm64 . + uses: docker/build-push-action@v3 + with: + push: true + platforms: linux/amd64,linux/arm64,linux/arm/v7 + tags: mhzawadi/phpmyadmin:dev diff --git a/.github/workflows/image-version.yml b/.github/workflows/image-version.yml index 0d3aaaf..d6d6086 100644 --- a/.github/workflows/image-version.yml +++ b/.github/workflows/image-version.yml @@ -11,14 +11,11 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - name: install buildx - id: buildx - uses: docker/setup-buildx-action@v1 - - name: Available platforms - run: echo ${{ steps.buildx.outputs.platforms }} + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 - name: Prepare id: prepare run: | @@ -27,7 +24,8 @@ jobs: - name: login to docker hub run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin - name: build the image - run: | - docker buildx build --push \ - --tag "mhzawadi/phpmyadmin:${{ steps.prepare.outputs.version }}" \ - --platform linux/amd64,linux/arm/v7,linux/arm64 . + uses: docker/build-push-action@v3 + with: + push: true + platforms: linux/amd64,linux/arm64,linux/arm/v7 + tags: "mhzawadi/phpmyadmin:${{ steps.prepare.outputs.version }}" diff --git a/Dockerfile b/Dockerfile index 39eea1c..a7d266d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.16 +FROM alpine:3.17 MAINTAINER Matthew Horwood # Install required deb packages From a42d9c4061c9732aed7bf67ec0a252ef56df2432 Mon Sep 17 00:00:00 2001 From: Matthew Horwood Date: Thu, 26 Jan 2023 21:19:46 +0000 Subject: [PATCH 2/3] bug: fix badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 20c0514..228ee22 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Run phpMyAdmin with Alpine, nginx and PHP FPM. ![GitHub Repo stars](https://img.shields.io/github/stars/mhzawadi/phpmyadmin?style=social) -![GitHub Workflow Status](https://img.shields.io/github/workflow/status/mhzawadi/phpmyadmin/build%20our%20image%20for%20latest?label=Docker%20Latest) +[![Latest image](https://github.com/mhzawadi/phpmyadmin/actions/workflows/image-latest.yml/badge.svg)](https://github.com/mhzawadi/phpmyadmin/actions/workflows/image-latest.yml) ![Docker Pulls](https://img.shields.io/docker/pulls/mhzawadi/phpmyadmin.svg) ![Docker Stars](https://img.shields.io/docker/stars/mhzawadi/phpmyadmin.svg) From 9895e0407756e294bb8d08bfdb06f930fa4d9d67 Mon Sep 17 00:00:00 2001 From: Matthew Horwood Date: Thu, 26 Jan 2023 21:21:38 +0000 Subject: [PATCH 3/3] bug: build dev image --- .github/workflows/image-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/image-test.yml b/.github/workflows/image-test.yml index db95e33..7fdac6e 100644 --- a/.github/workflows/image-test.yml +++ b/.github/workflows/image-test.yml @@ -1,9 +1,9 @@ -name: build dev image +name: build our image for dev on: workflow_dispatch: push: - branches-ignore: master + branches: dev jobs: build: