Skip to content

Update dependency prettier to v3.3.2 #34

Update dependency prettier to v3.3.2

Update dependency prettier to v3.3.2 #34

Workflow file for this run

name: Build openldap
on:
workflow_dispatch:
push:
paths:
- ".github/workflows/openldap.yml"
- "services/openldap/**"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build container
id: docker_build
uses: docker/build-push-action@v5
with:
context: services/openldap
push: ${{ github.ref == 'refs/heads/main' }}
tags: blindern/openldap:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Deploy ldap master
if: github.ref == 'refs/heads/main'
run: |
curl --fail -L -i -H "authorization: bearer $DEPLOYER_TOKEN" -H "content-type: application/json" -X POST https://deployer.foreningenbs.no/deploy -d '
{
"service": "ldap-master",
"attributes": {
"image": "blindern/openldap@${{ steps.docker_build.outputs.digest }}"
}
}'
env:
DEPLOYER_TOKEN: ${{ secrets.DEPLOYER_TOKEN }}
- name: Deploy ldap slave
if: github.ref == 'refs/heads/main'
run: |
curl --fail -L -i -H "authorization: bearer $DEPLOYER_TOKEN" -H "content-type: application/json" -X POST https://deployer.foreningenbs.no/deploy -d '
{
"service": "ldap-slave",
"attributes": {
"image": "blindern/openldap@${{ steps.docker_build.outputs.digest }}"
}
}'
env:
DEPLOYER_TOKEN: ${{ secrets.DEPLOYER_TOKEN }}