Hotfix/v2.1.3 #218
Workflow file for this run
This file contains hidden or 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: build | |
| on: | |
| release: | |
| types: [published] | |
| env: | |
| REPO: ${{ github.repository }} | |
| jobs: | |
| build-ssh: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: downcase REPO | |
| run: | | |
| echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV} | |
| - uses: actions/checkout@v4 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build docker image | |
| env: | |
| TAG: ghcr.io/${{ env.REPO }}_ssh_test:latest | |
| DOCKER_BUILDKIT: '1' | |
| run: | | |
| echo $TAG | |
| docker build integration_tests/ssh --tag $TAG --cache-from $TAG --build-arg BUILDKIT_INLINE_CACHE=1 | |
| docker push $TAG | |
| build-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: downcase REPO | |
| run: | | |
| echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV} | |
| - uses: actions/checkout@v4 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build docker image | |
| env: | |
| TAG: ghcr.io/${{ env.REPO }}_test:latest | |
| DOCKER_BUILDKIT: '1' | |
| run: | | |
| echo $TAG | |
| docker build --push --target=runtime -f .docker/test.Dockerfile . -t $TAG --cache-to type=gha,mode=max --cache-from $TAG --build-arg BUILDKIT_INLINE_CACHE=1 | |
| run-ssh-test: | |
| runs-on: ubuntu-latest | |
| needs: [build-tests, build-ssh] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Pull tests | |
| run: cd integration_tests/ssh && docker compose pull | |
| - name: run test enviroment | |
| run: cd integration_tests/ssh && docker compose up -d | |
| - name: run ssh test | |
| run: cd integration_tests/ssh && ./run.sh | |
| - name: shutdown test enviroment | |
| run: cd integration_tests/ssh && docker compose up -d | |
| run-tests: | |
| runs-on: ubuntu-latest | |
| needs: build-tests | |
| steps: | |
| - name: downcase REPO | |
| run: | | |
| echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV} | |
| - uses: actions/checkout@v4 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Pull tests | |
| env: | |
| TAG: ghcr.io/${{ env.REPO }}_test:latest | |
| run: docker compose -f docker-compose.remote.test.yml pull | |
| - name: Run tests | |
| env: | |
| TAG: ghcr.io/${{ env.REPO }}_test:latest | |
| run: docker compose -f docker-compose.remote.test.yml up --no-log-prefix --attach md-test --exit-code-from md-test | |
| - name: Teardown tests | |
| env: | |
| TAG: ghcr.io/${{ env.REPO }}_test:latest | |
| run: docker compose -f docker-compose.remote.test.yml down | |
| build-admin: | |
| runs-on: ubuntu-latest | |
| needs: [build-tests, run-ssh-test, run-tests] | |
| steps: | |
| - name: run admin build - init event | |
| if: github.event.action != 'Workflow Response' | |
| uses: peter-evans/repository-dispatch@v3 | |
| with: | |
| token: ${{ secrets.ACCESS_TOKEN_MD }} | |
| repository: MultiDirectoryLab/MultiDirectory-Web-Admin | |
| event-type: "Start Workflow" | |
| client-payload: '{"repository": "$GITHUB_REPOSITORY", "tag": "${{ github.ref_name }}" }' | |
| - name: run admin build - responce event | |
| if: github.event.action == 'Workflow Response' | |
| uses: peter-evans/repository-dispatch@v3 | |
| with: | |
| token: ${{ secrets.ACCESS_TOKEN_MD }} | |
| repository: MultiDirectoryLab/MultiDirectory-Web-Admin | |
| event-type: "Unexpected Event Demo" | |
| client-payload: '{"repository": "$GITHUB_REPOSITORY", "tag": "${{ github.ref_name }}" }' | |
| build-app: | |
| runs-on: ubuntu-latest | |
| needs: [build-tests, run-ssh-test, run-tests] | |
| steps: | |
| - name: downcase REPO | |
| run: | | |
| echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV} | |
| - uses: actions/checkout@v4 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build docker image | |
| env: | |
| TAG: ghcr.io/${{ env.REPO }}:latest | |
| TAG2: ghcr.io/${{ env.REPO }}:${{ github.ref_name }} | |
| DOCKER_BUILDKIT: '1' | |
| run: | | |
| echo $TAG | |
| echo $TAG2 | |
| docker build --push --target=runtime -f .docker/Dockerfile . -t $TAG -t $TAG2 --cache-to type=gha,mode=max --cache-from $TAG --build-arg BUILDKIT_INLINE_CACHE=1 --build-arg VERSION=${{ github.ref_name }} | |
| build-kerberos: | |
| runs-on: ubuntu-latest | |
| needs: [build-tests, run-ssh-test, run-tests] | |
| steps: | |
| - name: downcase REPO | |
| run: | | |
| echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV} | |
| - uses: actions/checkout@v4 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build docker image | |
| env: | |
| TAG: ghcr.io/${{ env.REPO }}_kerberos:latest | |
| TAG2: ghcr.io/${{ env.REPO }}_kerberos:${{ github.ref_name }} | |
| DOCKER_BUILDKIT: '1' | |
| run: | | |
| echo $TAG | |
| docker build \ | |
| --push \ | |
| --target=runtime \ | |
| -f .docker/krb.Dockerfile . \ | |
| -t $TAG \ | |
| -t $TAG2 \ | |
| --cache-to type=gha,mode=max \ | |
| --cache-from $TAG \ | |
| --build-arg BUILDKIT_INLINE_CACHE=1 \ | |
| --build-arg VERSION=latest |