elapsed time collector - main #387
This file contains hidden or 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: elapsed time collector | |
| run-name: elapsed time collector - ${{ github.ref_name }} | |
| on: | |
| schedule: | |
| - cron: "0 0 * * *" | |
| # So we can trigger manually if needed | |
| workflow_dispatch: | |
| # # To confirm any changes to docs build successfully, without deploying them | |
| # push: | |
| # branches: | |
| # - main | |
| # - "release-*" | |
| # paths: | |
| # - "docs/content/Coding Milestones/PoC2023q1/*-subs/**" | |
| # - "docs/content/Coding Milestones/PoC2023q1/*.md" | |
| # - "docs/content/common-subs/**" | |
| # - "docs/scripts/get-elapsed-time.sh" | |
| # - ".github/workflows/elapsed-time-collector.yml" | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_ALL_PROJECT_TOKEN }} | |
| permissions: | |
| contents: read | |
| jobs: | |
| elapsed-time-collector: | |
| if: github.repository_owner == 'kubestellar' | |
| name: elapsed time collector | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| strategy: | |
| fail-fast: true | |
| max-parallel: 1 | |
| matrix: | |
| manifest: | |
| - mailbox | |
| - scheduler | |
| - syncer | |
| - qs | |
| - placement | |
| - example1 | |
| steps: | |
| - run: echo "${{ matrix.manifest }}" | |
| - run: echo "${{ github.event_name }}" | |
| - name: echo fetching push or pull_request branch | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 | |
| with: | |
| token: ${{ secrets.GH_ALL_PROJECT_TOKEN }} | |
| persist-credentials: "false" | |
| ref: ${{ github.ref_name }} | |
| # run: echo running on branch ${{ github.ref_name }} | |
| # if: github.event_name == 'push' || github.event_name == 'pull_request' | |
| # - name: echo fetching workflow_dispatch branch | |
| # uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 | |
| # with: | |
| # ref: ${GITHUB_REF##*/} | |
| # if: github.event_name == 'workflow_dispatch' | |
| - run: git rev-parse --abbrev-ref HEAD | |
| - run: | | |
| EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) | |
| echo "MD_CONTENT<<$EOF" >> "$GITHUB_ENV" | |
| make FILENAME='${{ matrix.manifest }}' write-time-to-file >> "$GITHUB_ENV" | |
| echo "$EOF" >> "$GITHUB_ENV" | |
| id: run_make | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 | |
| with: | |
| token: ${{ secrets.GH_ALL_PROJECT_TOKEN }} | |
| persist-credentials: "false" | |
| ref: gh-pages | |
| # - run: | | |
| # echo ${{ env.MD_CONTENT }} | |
| - run: | | |
| cat <<EOF > elapsed-time/${{ matrix.manifest }}.dmd | |
| ${{ env.MD_CONTENT }} | |
| EOF | |
| echo "cat elapsed-time/${{ matrix.manifest }}.dmd" | |
| cat elapsed-time/${{ matrix.manifest }}.dmd | |
| - run: git config --global user.email "kubestellar@kubestellar-dev@google.groups.com" && git config --global user.name "KubeStellar" && git add . && git commit -m "Add changes" && git push origin gh-pages || true |