-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 1.08 KB
/
docker-image-arm64.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
name: Docker Image CI arm64
on:
workflow_dispatch:
# push:
# branches: [ master ]
# pull_request:
# branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
environment: Build_Arm64
env:
DOCKER_USERNAME: '${{ secrets.DOCKER_USERNAME }}'
DOCKER_PASSWORD: '${{ secrets.DOCKER_PASSWORD }}'
DOCKER_PLATFORM: 'linux/arm64'
steps:
- name: Checkout the code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Prepare
if: success()
id: prepare
run: |
echo "docker_plaform=${DOCKER_PLATFORM}" >> $GITHUB_OUTPUT
- name: Docker Login
run: |
echo "${DOCKER_PASSWORD}" | docker login --username ${DOCKER_USERNAME} --password-stdin
- name: Build the Docker image
if: success()
run: >
docker buildx build --platform ${DOCKER_PLATFORM} --file docker/Dockerfile.arm64
--tag kfilippov/cut:arm64_$(date +%s) --tag kfilippov/cut:arm64 --tag kfilippov/cut:latest
--output type=image,push=true .