Skip to content

Commit fcc98e3

Browse files
authored
add support for arm64
1 parent efb0ec0 commit fcc98e3

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

.github/workflows/deploy.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,23 @@ on: [push]
44

55
jobs:
66
build-and-deploy:
7+
name: "Build Docker Image and deploy to Registry"
78
runs-on: ubuntu-latest
9+
if: github.ref == 'refs/heads/main'
810
steps:
911
- uses: actions/checkout@v2
10-
- name: Build Docker Image
12+
- name: Set up QEMU
13+
uses: docker/setup-qemu-action@v2
14+
with:
15+
platforms: 'arm64,arm'
16+
- name: Setup Buildx
17+
uses: docker/setup-buildx-action@v2
18+
- name: Login to DockerRegistry
19+
uses: docker/login-action@v2
20+
with:
21+
registry: ghcr.io
22+
username: ${{ github.actor }}
23+
password: ${{ secrets.GITHUB_TOKEN }}
24+
- name: Build and push
1125
run: |
12-
docker build -t docker.pkg.github.com/yanni8/m295/app:latest .
13-
- name: Login to GitHub Packages
14-
run: |
15-
echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u "${{ github.actor }}" --password-stdin
16-
- name: Push Docker Image
17-
run: |
18-
docker push docker.pkg.github.com/yanni8/m295/app:latest
26+
docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/yanni8/m295/app:latest --push .

0 commit comments

Comments
 (0)