-
Notifications
You must be signed in to change notification settings - Fork 15
30 lines (28 loc) · 1.02 KB
/
docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: Publish Docker and Deploy App
on:
push:
branches:
- 'master'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: cmeter/url-shortener
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Trigger Gitlab to pull changes
uses: wei/curl@master
with:
args: -X POST --header '${{ secrets.GITLAB_PULL_HEADER }}' https://gitlab.cs.uni-duesseldorf.de/api/v4/projects/1581/mirror/pull
- name: Wait so that GitLab can pull latest changes before triggering the CI/CD process
uses: jakejarvis/wait-action@master
with:
time: '10s'
- name: Trigger Gitlab CI/CD
uses: wei/curl@master
with:
args: -X POST -F token=${{ secrets.GITLAB_TOKEN }} -F ref=master https://gitlab.cs.uni-duesseldorf.de/api/v4/projects/1581/trigger/pipeline