.github/workflows/prep_sources.yml
author Edouard Tisserant <edouard.tisserant@gmail.com>
Sat, 13 Aug 2022 17:26:17 +0200
changeset 90 ab4e99dc80cb
parent 85 63af88f62324
child 91 8d8e7a792903
permissions -rw-r--r--
GH CD: Merge sources and snap dir instead of just giving checkout and artfifact download the same path
name: Prepare sources

on:
  workflow_call:
    outputs:
      beremiz_revisionid:
        value: ${{ jobs.get_sources.env.beremiz_revisionid }}
      matiec_revisionid:
        value: ${{ jobs.get_sources.env.matiec_revisionid }}
      canfestival_revisionid:
        value: ${{ jobs.get_sources.env.canfestival_revisionid }}
      Modbus_revisionid:
        value: ${{ jobs.get_sources.env.Modbus_revisionid }}
      open62541_revisionid:
        value: ${{ jobs.get_sources.env.opem62541_revisionid }}

jobs:
  get_sources:
    runs-on: ubuntu-latest

    env:
        beremiz_revisionid: 1dcd41a37e057a24118ec52f7f2a02b50eae5dff
        matiec_revisionid: ba00e2b18e7335c03c011e1c6b2a5d99fc3571c3
        canfestival_revisionid: 12a05e422666c738d1312259703f80150c747cb5
        Modbus_revisionid: 75ba7cb15908411e71bf0e7b66651d182f347747
        open62541_revisionid: ff73268829359639531ff02905c889f73a77b408


    steps:
    # repositories are directly checked out where Makerfile expects them to be
    - uses: actions/checkout@v3
      with:
          repository: beremiz/beremiz
          ref: ${{ env.beremiz_revisionid }}
          path: build/sources/beremiz

    - uses: actions/checkout@v3
      with:
          repository: beremiz/matiec
          ref: ${{ env.matiec_revisionid }}
          path: build/sources/matiec

    - uses: actions/checkout@v3
      with:
          repository: beremiz/canfestival
          ref: ${{ env.canfestival_revisionid }}
          path: build/sources/canfestival

    - uses: actions/checkout@v3
      with:
          repository: beremiz/Modbus
          ref: ${{ env.Modbus_revisionid }}
          path: build/sources/Modbus

    - uses: actions/checkout@v3
      with:
          repository: open62541/open62541
          ref: ${{ env.open62541_revisionid }}
          path: build/sources/open62541

    - name: Touch expected Makfile targets to shortcut HG checkout
      run: |
        touch build/sources/beremiz_${{ env.beremiz_revisionid }}
        touch build/sources/matiec_${{ env.matiec_revisionid }}
        touch build/sources/canfestival_${{ env.canfestival_revisionid }}
        touch build/sources/Modbus_${{ env.Modbus_revisionid }}
        touch build/sources/open62541_${{ env.open62541_revisionid }}
        touch build/sources/beremiz_src
        touch build/sources/matiec_src
        touch build/sources/canfestival_src
        touch build/sources/Modbus_src
        touch build/sources/open62541_src
        touch build/own_sources
        cat >> build/revisions.txt <<EOF
        beremiz_public_dist ${{ github.sha }}
        beremiz ${{ env.beremiz_revisionid }}
        matiec ${{ env.matiec_revisionid }}
        canfestival ${{ env.canfestival_revisionid }}
        Modbus ${{ env.Modbus_revisionid }}
        open62541 ${{ env.open62541_revisionid }}
        EOF

    - name: Upload source artifact
      uses: actions/upload-artifact@v3
      with:
        name: source_package
        path: build