File: cd.yml

package info (click to toggle)
ecbuild 3.13.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,068 kB
  • sloc: sh: 1,404; perl: 732; f90: 472; cpp: 466; python: 383; ansic: 304; fortran: 43; makefile: 15
file content (27 lines) | stat: -rw-r--r-- 761 bytes parent folder | download
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
name: CD

on:
  push:
    tags:
      - 'v?[0-9]+.[0-9]+.[0-9]+'
      - 'v?[0-9]+.[0-9]+.[0-9]+-*'
    branches:
      - '*'
  pull_request:
    types: [opened, synchronize, reopened, labeled]
  workflow_dispatch:

permissions:
  contents: write

jobs:
  build-and-release:
    name: "${{ startsWith(github.ref, 'refs/tags/') && 'Build and Release' || 'Dry Run' }}"
    if: |
      startsWith(github.ref, 'refs/tags/') ||
      github.ref_name == github.event.repository.default_branch ||
      (github.event.pull_request.base.ref == github.event.repository.default_branch && github.event.label.name == 'approved-for-cd')
    uses: ecmwf/reusable-workflows/.github/workflows/main-cd.yml@v2
    with:
      ref_name: ${{ github.ref_name }}
    secrets: inherit