Skip to content

Commit 66d0c84

Browse files
authoredMar 4, 2024
Merge pull request #231 from web-cat/master
add GitHub actions to branch
2 parents ccfd608 + e7e6baf commit 66d0c84

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed
 

‎.github/workflows/deploy-acos.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: deploy-acos
2+
on:
3+
push:
4+
branches:
5+
- keweizhan
6+
7+
jobs:
8+
build:
9+
name: deploy-acos
10+
runs-on: self-hosted
11+
steps:
12+
- name: ssh
13+
uses: fifsky/ssh-action@master
14+
with:
15+
host: ${{ secrets.STAGING_HOST }}
16+
user: ${{ secrets.STAGING_USERNAME }}
17+
key: ${{ secrets.STAGING_KEY }}
18+
port: ${{ secrets.STAGING_PORT }}
19+
args: "-tt"
20+
command: |
21+
cd /home/deploy/code-workout/
22+
docker compose pull
23+
docker-compose down
24+
docker-compose up -d

‎.github/workflows/image-build.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: image-build
2+
on:
3+
push:
4+
branches:
5+
- keweizhan
6+
jobs:
7+
build:
8+
name: code-workout-image
9+
runs-on: ubuntu
10+
steps:
11+
-
12+
name: Checkout
13+
uses: actions/checkout@v3
14+
-
15+
name: Set up QEMU
16+
uses: docker/setup-qemu-action@v3
17+
-
18+
name: Set up Docker Buildx
19+
uses: docker/setup-buildx-action@v3
20+
-
21+
name: Login to Docker Hub
22+
uses: docker/login-action@v3
23+
with:
24+
username: ${{ secrets.DOCKER_USERNAME }}
25+
password: ${{ secrets.DOCKER_TOKEN }}
26+
-
27+
name: Build and push
28+
uses: docker/build-push-action@v5
29+
with:
30+
context: .
31+
push: true
32+
tags: opendsa/code-workout:latest

0 commit comments

Comments
 (0)