Skip to content

Commit

Permalink
ci: update actions version & platforms.
Browse files Browse the repository at this point in the history
add test image build action.
  • Loading branch information
riccox committed Sep 23, 2023
1 parent 70319be commit 9cc10f4
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 9 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/docker-build-latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,30 @@ on:
jobs:
dockerhub-build-push:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform:
- linux/amd64
- linux/arm/v6
- linux/arm/v7
- linux/arm64
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: ${{ matrix.platform }}
tags: ${{ env.dockerhub_repository }}:${{ env.dockerhub_tag }}
18 changes: 13 additions & 5 deletions .github/workflows/docker-build-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,31 @@ on:
jobs:
dockerhub-build-push:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform:
- linux/amd64
- linux/arm/v6
- linux/arm/v7
- linux/arm64
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
platforms: ${{ matrix.platform }}
push: true
tags: ${{ env.dockerhub_repository }}:${{ github.event.release.tag_name }}, ${{ env.dockerhub_repository }}:latest
- name: Update repo description
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/docker-build-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: docker-build-test

env:
dockerhub_repository: "riccoxie/meilisearch-ui"
dockerhub_tag: "test"

on:
push:
branches:
- test

jobs:
dockerhub-build-push:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform:
- linux/amd64
- linux/arm/v6
- linux/arm/v7
- linux/arm64
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: ${{ matrix.platform }}
tags: ${{ env.dockerhub_repository }}:${{ env.dockerhub_tag }}

0 comments on commit 9cc10f4

Please sign in to comment.