Skip to content

Commit da4dd5d

Browse files
authored
Merge pull request #3 from ByteBard58/ByteBard58-patch-1
Create Github actions file for automating docker image build
2 parents 699f62a + de5c889 commit da4dd5d

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/docker.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Build & Push Multi-Arch Docker Image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
docker-build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repo
14+
uses: actions/checkout@v4
15+
16+
- name: Set up QEMU for multi-arch builds
17+
uses: docker/setup-qemu-action@v3
18+
19+
- name: Set up Docker Buildx
20+
uses: docker/setup-buildx-action@v3
21+
22+
- name: Log in to Docker Hub
23+
uses: docker/login-action@v3
24+
with:
25+
username: ${{ secrets.DOCKERHUB_USERNAME }}
26+
password: ${{ secrets.DOCKERHUB_TOKEN }}
27+
28+
- name: Build and push multi-arch image
29+
uses: docker/build-push-action@v5
30+
with:
31+
context: .
32+
file: ./Dockerfile
33+
platforms: linux/amd64,linux/arm64
34+
push: true
35+
tags: bytebard101/cosmoclassifier:latest

0 commit comments

Comments
 (0)