Merge pull request #44 from n2o/n2o-patch-1 #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |