.github/workflows/prep_sources.yml
author Edouard Tisserant <edouard.tisserant@gmail.com>
Sun, 14 Aug 2022 16:54:43 +0200
changeset 97 4dd65c75e651
parent 96 52b64ebc1970
child 98 54c0e2662dd3
permissions -rw-r--r--
GH CD: Seriously ? https://github.com/actions/upload-artifact#maintaining-file-permissions-and-case-sensitive-files
name: Prepare sources

on:
  workflow_call:


jobs:
  get_sources:
    runs-on: ubuntu-latest

    env:
        beremiz_revisionid: 45a361db05a3e243ad15467fa066ea96aee48861
        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: Keep Makfile satisfied and generate revisions.txt
      run: |
        touch build/sources/beremiz_stamp
        touch build/sources/matiec_stamp
        touch build/sources/canfestival_stamp
        touch build/sources/Modbus_stamp
        touch build/sources/open62541_stamp
        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/sources/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: Tar files
      run: tar -cvf build.tar build

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