Create #22
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: Create | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| V8Version: | |
| description: Version or Commit | |
| type: string | |
| required: true | |
| schedule: | |
| - cron: '0 0 1 * *' | |
| concurrency: | |
| group: ${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.REPO_ACCESS_TOKEN }} | |
| - name: Check initial disk space | |
| run: df -h | |
| - name: Check /mnt permissions | |
| run: | | |
| ls -ld /mnt | |
| sudo chown runner:runner /mnt | |
| sudo chmod u+rwX /mnt | |
| - name: Download doxygen | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y doxygen graphviz | |
| - name: Determine V8 Version | |
| id: v8-version | |
| run: | | |
| if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then | |
| echo "version=${{ inputs.V8Version }}" >> $GITHUB_OUTPUT | |
| else | |
| latest_tag=$(git ls-remote --tags https://github.com/v8/v8 | sort -t '/' -k 3 -V | tail -n 1 | awk -F/ '{print $NF}') | |
| echo "version=$latest_tag" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Download V8 Source Code | |
| run: | | |
| mkdir -p /mnt/V8SourceCode | |
| git clone --branch ${{ steps.v8-version.outputs.version }} --depth 1 https://github.com/v8/v8 /mnt/V8SourceCode | |
| du -sh /mnt/V8SourceCode | |
| - name: Create V8Docs | |
| run: | | |
| mkdir -p /mnt/V8Docs | |
| doxygen Doxyfile | |
| du -sh /mnt/V8Docs | |
| - name: Clean up temporary files | |
| run: | | |
| rm -rf /mnt/V8SourceCode | |
| - name: Delete Existing V8Docs and Commit New V8Docs | |
| run: | | |
| rm -rf $GITHUB_WORKSPACE/V8Docs | |
| mkdir -p $GITHUB_WORKSPACE/V8Docs | |
| cp -r /mnt/V8Docs/* $GITHUB_WORKSPACE/V8Docs/ | |
| rm -rf /mnt/V8Docs | |
| git config --global user.name '7resp4ss' | |
| git config --global user.email '81899344+7resp4ss@users.noreply.github.com' | |
| git add -A V8Docs/ | |
| git commit -m "Update V8Docs for V8 version ${{ steps.v8-version.outputs.version }}" | |
| git push https://x:${{ secrets.REPO_ACCESS_TOKEN }}@github.com/7resp4ss/DoxygenV8.git HEAD:${{ github.ref_name }} | |
| - name: Check final disk space | |
| run: df -h |