-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (31 loc) · 1020 Bytes
/
rust.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
name: Rust Docker Build and Publish
on:
push:
branches:
- main
jobs:
build-and-publish:
name: Build and Publish Docker Image
runs-on: ubuntu-latest
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }}
IMAGE_NAME: ${{ secrets.DOCKER_IMAGE }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to Docker registry
run: docker login $DOCKER_REGISTRY -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- name: Build and push Docker image
run: |
docker buildx create --use
docker buildx build --platform linux/arm64 -t $DOCKER_REGISTRY/$IMAGE_NAME:latest --push .
env:
DOCKER_CLI_AARCH64: 1
DOCKER_BUILDKIT: 1