Skip to content
This repository was archived by the owner on Apr 23, 2025. It is now read-only.

Commit fb255f4

Browse files
authored
Update and rename main.yml to docker.yml
1 parent 4442f1b commit fb255f4

File tree

2 files changed

+39
-15
lines changed

2 files changed

+39
-15
lines changed

.github/workflows/docker.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Docker
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
workflow_dispatch:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
env:
14+
GITHUB_IMAGE_NAME: ${{ github.repository }}
15+
GITHUB_REGISTRY: ghcr.io
16+
17+
jobs:
18+
build-and-deploy:
19+
name: Build and Deploy
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Login to ${{ env.GITHUB_REGISTRY }}
26+
uses: docker/login-action@v3
27+
with:
28+
registry: ${{ env.GITHUB_REGISTRY }}
29+
username: ${{ github.actor }}
30+
password: ${{ secrets.GITHUB_TOKEN }}
31+
32+
- name: Build and Push Image
33+
uses: docker/build-push-action@v6
34+
with:
35+
context: .
36+
push: true
37+
tags: |
38+
${{ env.GITHUB_REGISTRY }}/${{ env.GITHUB_IMAGE_NAME }}
39+
${{ env.GITHUB_REGISTRY }}/${{ env.GITHUB_IMAGE_NAME }}:${{ github.ref_name }}

.github/workflows/main.yml

-15
This file was deleted.

0 commit comments

Comments
 (0)