forked from georchestra/georchestra
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (42 loc) · 1.82 KB
/
ldap.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: "LDAP"
on:
workflow_dispatch:
push:
paths:
- "ldap/**"
pull_request:
paths:
- "ldap/**"
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: "Checking out"
uses: actions/checkout@v1
- name: Getting image tag
id: version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- name: "Building docker image"
if: github.repository == 'georchestra/georchestra'
working-directory: ldap/
run: docker build -t georchestra/ldap:${{ steps.version.outputs.VERSION }} .
- name: "Logging in docker.io"
if: github.repository == 'georchestra/georchestra' && github.actor != 'dependabot[bot]'
uses: azure/docker-login@v1
with:
username: '${{ secrets.DOCKER_HUB_USERNAME }}'
password: '${{ secrets.DOCKER_HUB_PASSWORD }}'
- name: "Pushing latest to docker.io"
if: github.ref == 'refs/heads/master' && github.repository == 'georchestra/georchestra' && github.actor != 'dependabot[bot]' && github.event_name != 'pull_request'
run: |
docker tag georchestra/ldap:${{ steps.version.outputs.VERSION }} georchestra/ldap:latest
docker push georchestra/ldap:latest
- name: "Pushing release branch to docker.io"
if: contains(github.ref, 'refs/heads/22.') && github.repository == 'georchestra/georchestra' && github.actor != 'dependabot[bot]' && github.event_name != 'pull_request'
run: |
docker push georchestra/ldap:${{ steps.version.outputs.VERSION }}
- name: "Pushing release tag to docker.io"
if: contains(github.ref, 'refs/tags/22.') && github.repository == 'georchestra/georchestra' && github.actor != 'dependabot[bot]' && github.event_name != 'pull_request'
run: |
docker push georchestra/ldap:${{ steps.version.outputs.VERSION }}