mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-22 15:25:49 +00:00
Create main.yml
This commit is contained in:
parent
a7e2ecad46
commit
f74a22a093
1 changed files with 26 additions and 0 deletions
26
.github/workflows/main.yml
vendored
Normal file
26
.github/workflows/main.yml
vendored
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
name: CI
|
||||||
|
on:
|
||||||
|
#push:
|
||||||
|
# branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Run a multi-line script
|
||||||
|
run: |
|
||||||
|
echo Add other actions to build,
|
||||||
|
echo test, and deploy your project.
|
||||||
|
set -x
|
||||||
|
compose=etc/docker/swarm/docker-compose.yaml
|
||||||
|
date=$( date +%s )
|
||||||
|
script=.github/bin/check-service.sh
|
||||||
|
sed -i s/worker/manager/ ${compose}
|
||||||
|
sed -i s/secobau/${date}/ ${compose}
|
||||||
|
docker swarm init
|
||||||
|
docker build -t ${date}/spring-petclinic --no-cache .
|
||||||
|
docker stack deploy -c ${compose} petclinic
|
||||||
|
chmod +x ${script}
|
||||||
|
./${script}
|
Loading…
Reference in a new issue