aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/container_test.yml
blob: 410d1d21a31d0aa9936fe88363e4e0339d4a49d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Test Building Container Images

on:
  push:
  pull_request:
  workflow_dispatch: []

concurrency:
  group: ${{ github.head_ref }}/container_test
  cancel-in-progress: true

jobs:
  build-test:
    runs-on: [ubuntu-latest]
    strategy:
      matrix:
        platform: [ linux ]
        arch: [ amd64, arm, arm64, 386 ]

    steps:
      -
        name: Checkout
        uses: actions/checkout@v2
      -
        name: Docker meta
        id: docker_meta
        uses: docker/metadata-action@v3
        with:
          images: |
            chrislusf/seaweedfs
            ghcr.io/chrislusf/seaweedfs
          tags: |
            type=raw,value=latest
          labels: |
            org.opencontainers.image.title=seaweedfs
            org.opencontainers.image.vendor=Chris Lu
      -
        name: Set up QEMU
        uses: docker/setup-qemu-action@v1
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v1
        with:
          buildkitd-flags: "--debug"
      -
        name: Build
        uses: docker/build-push-action@v2
        with:
          context: ./docker
          push: ${{ github.event_name != 'pull_request' }}
          file: ./docker/Dockerfile
          platforms: ${{ matrix.platform }}/${{ matrix.arch }}
          tags: ${{ steps.docker_meta.outputs.tags }}
          labels: ${{ steps.docker_meta.outputs.labels }}