.github/workflows/prep_sources.yml
author Edouard Tisserant <edouard.tisserant@gmail.com>
Thu, 28 Jul 2022 17:05:53 +0200
changeset 73 5b6508694623
parent 68 8eb533b797be
child 76 1ed6c9812863
permissions -rw-r--r--
merge and update revision IDs
68
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     1
name: Prepare sources
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     2
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     3
env:
73
5b6508694623 merge and update revision IDs
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 68
diff changeset
     4
    beremiz_revisionid: c3847f87bde2d520b856e353498cb2bad9d83911
68
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     5
    matiec_revisionid: ba00e2b18e7335c03c011e1c6b2a5d99fc3571c3
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     6
    canfestival_revisionid: 12a05e422666c738d1312259703f80150c747cb5
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     7
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     8
on:
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     9
  workflow_call:
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    10
    outputs:
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    11
      beremiz_revisionid:
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    12
        value: ${{ env.beremiz_revisionid }}
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    13
      matiec_revisionid:
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    14
        value: ${{ env.matiec_revisionid }}
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    15
      canfestival_revisionid:
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    16
        value: ${{ env.canfestival_revisionid }}
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    17
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    18
jobs:
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    19
  get_sources:
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    20
    runs-on: ubuntu-latest
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    21
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    22
    steps:
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    23
    - uses: actions/checkout@v3
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    24
      with:
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    25
          path: beremiz_public_dist
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    26
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    27
    # repositories are directly checked out where Makerfile expects them to be
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    28
    - uses: actions/checkout@v3
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    29
      with:
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    30
          repository: beremiz/beremiz
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    31
          ref: ${{ env.beremiz_revisionid }}
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    32
          path: build/sources/beremiz
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    33
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    34
    - uses: actions/checkout@v3
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    35
      with:
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    36
          repository: beremiz/matiec
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    37
          ref: ${{ env.matiec_revisionid }}
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    38
          path: build/sources/matiec
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    39
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    40
    - uses: actions/checkout@v3
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    41
      with:
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    42
          repository: beremiz/canfestival
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    43
          ref: ${{ env.canfestival_revisionid }}
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    44
          path: build/sources/canfestival
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    45
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    46
    - name: Touch expected Makfile targets to shortcut HG checkout
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    47
      run: |
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    48
        touch build/sources/beremiz_${{ env.beremiz_revisionid }}
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    49
        touch build/sources/matiec_${{ env.matiec_revisionid }}
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    50
        touch build/sources/canfestival_${{ env.canfestival_revisionid }}
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    51
        touch build/sources/beremiz_src
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    52
        touch build/sources/matiec_src
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    53
        touch build/sources/canfestival_src
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    54
        touch build/own_sources
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    55
        cat >> build/revisions.txt <<EOF
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    56
        beremiz_public_dist ${{ github.sha }}
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    57
        beremiz ${{ env.beremiz_revisionid }}
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    58
        matiec ${{ env.matiec_revisionid }}
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    59
        canfestival ${{ env.canfestival_revisionid }}
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    60
        EOF
8eb533b797be GH action : split workflows for later re-use of source provisioning.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    61