Revise documentation deployment #470
Workflow file for this run
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: GitLab CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
# | |
# Deferred GitLab pipelines at gitlab.dkrz.de (see .gitlab/dkrz.yml): | |
# | |
trigger: | |
if: | | |
github.repository_owner == 'earth-system-radiation' && | |
( github.event_name != 'pull_request' || | |
( github.event.pull_request.head.repo.owner.login == github.repository_owner && | |
github.event.pull_request.user.login != 'dependabot[bot]' )) | |
runs-on: ubuntu-latest | |
outputs: | |
ref-type: ${{ steps.g-push-rev.outputs.ref-type }} | |
ref-name: ${{ steps.g-push-rev.outputs.ref-name }} | |
pipeline-id: ${{ steps.gl-trigger-pipeline.outputs.pipeline-id }} | |
steps: | |
- name: Check out GitHub repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Push to GitLab repository | |
id: g-push-rev | |
uses: "skosukhin/git-ci-hub-lab/g-push-rev@v1" | |
with: | |
remote-url: ${{ vars.DKRZ_GITLAB_SERVER }}/${{ vars.DKRZ_GITLAB_PROJECT }}.git | |
password: ${{ secrets.DKRZ_GITLAB_TOKEN }} | |
rev-id: ${{ github.sha }} | |
rev-signing-format: ssh | |
rev-signing-key: ${{ secrets.GITLAB_SIGNING_KEY }} | |
ref-type: branch | |
force-push: true | |
- name: Trigger GitLab CI/CD Pipeline | |
id: gl-trigger-pipeline | |
uses: "skosukhin/git-ci-hub-lab/gl-trigger-pipeline@v1" | |
with: | |
server-url: ${{ vars.DKRZ_GITLAB_SERVER }} | |
project-name: ${{ vars.DKRZ_GITLAB_PROJECT }} | |
token: ${{ secrets.DKRZ_GITLAB_TRIGGER_TOKEN }} | |
ref-name: ${{ steps.g-push-rev.outputs.ref-name }} | |
expected-sha: ${{ steps.g-push-rev.outputs.ref-commit }} | |
attach: | |
runs-on: ubuntu-latest | |
needs: trigger | |
strategy: | |
fail-fast: false | |
matrix: | |
config-name: | |
- cce-gpu-openacc-DP | |
- cce-gpu-openacc-SP | |
- nag-cpu-accel-DP | |
- nag-cpu-default-SP | |
- nvhpc-gpu-openacc-DP | |
- nvhpc-gpu-openacc-SP | |
steps: | |
- name: Build, run and check (fetch the log) | |
uses: "skosukhin/git-ci-hub-lab/gl-attach-job@v1" | |
with: | |
server-url: ${{ vars.DKRZ_GITLAB_SERVER }} | |
project-name: ${{ vars.DKRZ_GITLAB_PROJECT }} | |
token: ${{ secrets.DKRZ_GITLAB_TOKEN }} | |
pipeline-id: ${{ needs.trigger.outputs.pipeline-id }} | |
job-name: ${{ matrix.config-name }} | |
cleanup: | |
runs-on: ubuntu-latest | |
needs: [trigger, attach] | |
if: always() && needs.trigger.result != 'skipped' | |
continue-on-error: true | |
steps: | |
- uses: "skosukhin/git-ci-hub-lab/g-delete-ref@v1" | |
with: | |
remote-url: ${{ vars.DKRZ_GITLAB_SERVER }}/${{ vars.DKRZ_GITLAB_PROJECT }}.git | |
password: ${{ secrets.DKRZ_GITLAB_TOKEN }} | |
ref-type: ${{ needs.trigger.outputs.ref-type }} | |
ref-name: ${{ needs.trigger.outputs.ref-name }} | |
force: true |