Skip to content

Commit 89690d8

Browse files
committed
workflow added
1 parent dc7b7f6 commit 89690d8

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build and Push Docker Image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
docker:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v3
15+
16+
- name: Log in to Docker Hub
17+
uses: docker/login-action@v2
18+
with:
19+
username: ${{ secrets.DOCKER_USERNAME }}
20+
password: ${{ secrets.DOCKER_TOKEN }}
21+
22+
- name: Set up Docker Buildx
23+
uses: docker/setup-buildx-action@v3
24+
25+
- name: Build and push Docker image
26+
uses: docker/build-push-action@v5
27+
with:
28+
context: .
29+
push: true
30+
tags: sharkfin/container_hunt:latest
31+
32+
- name: Notify Deployment Server
33+
env:
34+
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
35+
DEPLOY_URL: ${{ secrets.DEPLOY_URL }} # e.g. https://your-server.example.com/deploy
36+
run: |
37+
curl -X POST "$DEPLOY_URL" \
38+
-H "Authorization: Bearer $DEPLOY_TOKEN" \
39+
-H "Content-Type: application/json" \
40+
-d '{"compose_dir": "container_hunt_dc"}'

0 commit comments

Comments
 (0)