Nightly Build #172
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: Nightly Build | |
| on: | |
| push: | |
| branches: | |
| - test | |
| - main | |
| schedule: | |
| - cron: "0 3 * * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout x2ansible | |
| uses: actions/checkout@v4 | |
| - name: Checkout rhdh-plugins | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: redhat-developer/rhdh-plugins | |
| path: rhdh-plugins | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| - name: Install Yarn | |
| run: corepack enable && corepack prepare yarn@4 --activate | |
| - name: Login to Quay.io | |
| uses: redhat-actions/podman-login@v1 | |
| with: | |
| registry: quay.io | |
| username: ${{ secrets.QUAY_USERNAME }} | |
| password: ${{ secrets.QUAY_PASSWORD }} | |
| - name: Install workspace dependencies | |
| working-directory: rhdh-plugins/workspaces/x2a | |
| run: yarn install | |
| - name: Generate TypeScript declarations | |
| working-directory: rhdh-plugins/workspaces/x2a | |
| run: yarn tsc | |
| - name: Build and push dynamic plugins | |
| working-directory: rhdh-plugins/workspaces/x2a | |
| run: ./scripts/build-dynamic-plugins.sh --push --tag nightly | |
| - name: Generate plugins report | |
| working-directory: rhdh-plugins/workspaces/x2a | |
| run: | | |
| mkdir -p ${{ github.workspace }}/docs/_data | |
| ./scripts/build-dynamic-plugins.sh --report > ${{ github.workspace }}/docs/_data/rhdh-plugins-latest.json | |
| - name: Check for changes | |
| id: changes | |
| run: | | |
| git add docs/_data/rhdh-plugins-latest.json | |
| if git diff --cached --quiet; then | |
| echo "changed=false" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "changed=true" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Create pull request | |
| if: steps.changes.outputs.changed == 'true' | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| branch: automated/rhdh-plugins-latest-sync | |
| commit-message: "chore: update rhdh-plugins-latest.json" | |
| title: "chore: update rhdh-plugins-latest.json" | |
| body: | | |
| Automated PR to update the latest RHDH plugins report. | |
| This PR was created by the `nightly-build` workflow. | |
| add-paths: docs/_data/rhdh-plugins-latest.json |