Skip to content

Commit ac2f647

Browse files
committed
add docker workflow
1 parent b3b668d commit ac2f647

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

.github/workflows/docker.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Docker main build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency:
9+
group: docker-main
10+
cancel-in-progress: true
11+
12+
jobs:
13+
docker:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Set up Docker Buildx
18+
uses: docker/setup-buildx-action@v3
19+
- name: Log in to Docker Hub
20+
uses: docker/login-action@v3
21+
with:
22+
registry: ghcr.io
23+
username: ${{ github.actor }}
24+
password: ${{ secrets.GITHUB_TOKEN }}
25+
- name: Build the new image
26+
run: docker build . -t ghcr.io/zeuswpi/coma:${{ github.sha }}
27+
- name: Tag the new image with latest
28+
run: docker tag ghcr.io/zeuswpi/coma:${{ github.sha }} ghcr.io/zeuswpi/coma:latest
29+
- name: Push Docker image
30+
run: docker push --all-tags ghcr.io/zeuswpi/coma

0 commit comments

Comments
 (0)