Create main.yml

This commit is contained in:
jeroen22319 2020-06-26 13:50:56 +02:00 committed by GitHub
parent a7e2ecad46
commit f74a22a093
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

26
.github/workflows/main.yml vendored Normal file
View 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}