-
Notifications
You must be signed in to change notification settings - Fork 7
54 lines (40 loc) · 1.17 KB
/
docker-publish.yml
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
name: Docker Build and Publish
on:
push:
branches:
- main
workflow_dispatch:
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
jobs:
build-and-push:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ ubuntu-latest ]
arch: [ amd64, arm64 ]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Login to DockerHub
run: echo "${DOCKERHUB_PASSWORD}" | docker login --username "${DOCKERHUB_USERNAME}" --password-stdin
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Build and push AMD64 image
uses: docker/build-push-action@v2
with:
context: .
push: true
platforms: linux/amd64
tags: charliecaptain/meowai-image:latest
- name: Build and push ARM64 image
uses: docker/build-push-action@v2
with:
context: .
push: true
platforms: linux/arm64
tags: charliecaptain/meowai-image:latest-arm-linux