Skip to content

Commit b652b83

Browse files
committed
Added auto deployment of docker image
1 parent 89c51e1 commit b652b83

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Create and Publish the basic Docker Image
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
env:
8+
REGISTRY: ghcr.io
9+
IMAGE_NAME: ${{ github.repository }}
10+
11+
jobs:
12+
build-and-push-image:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
packages: write
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
22+
- name: Set up QEMU
23+
uses: docker/setup-qemu-action@v3.1.0
24+
25+
- name: Set up Docker Buildx
26+
uses: docker/setup-buildx-action@v3.4.0
27+
28+
- name: Docker Login
29+
uses: docker/login-action@v3.2.0
30+
with:
31+
registry: ${{ env.REGISTRY }}
32+
username: ${{ github.actor }}
33+
password: ${{ secrets.GITHUB_TOKEN }}
34+
35+
- name: Docker Metadata action
36+
id: meta
37+
uses: docker/metadata-action@v5.5.1
38+
with:
39+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
40+
41+
- name: Build and push Docker image
42+
uses: docker/build-push-action@v5.4.0
43+
with:
44+
context: .
45+
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8
46+
push: true
47+
tags: ${{ steps.meta.outputs.tags }}
48+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)