Adds ui tool #1076
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: RIT Action Continuous Integration Test | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| inputs: | |
| rskj-branch: | |
| description: 'Branch for RSKj' | |
| required: false | |
| default: 'master' | |
| powpeg-branch: | |
| description: 'Branch for PowPeg Node' | |
| required: false | |
| default: 'master' | |
| permissions: | |
| contents: read | |
| env: | |
| TEST_TAG: ${{ github.event.repository.name }}/rit:test | |
| LATEST_TAG: ghcr.io/rsksmart/${{ github.event.repository.name }}/rit | |
| jobs: | |
| build-push-rit-action-container-action: | |
| name: Test RIT Action docker container-action | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| permissions: | |
| packages: write | |
| steps: | |
| - name: Checkout | |
| id: checkout | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Docker meta | |
| id: meta | |
| uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0 | |
| with: | |
| images: | | |
| ${{ env.LATEST_TAG }} | |
| ${{ env.TEST_TAG }} | |
| - name: Setup Docker BuildX | |
| id: setup-buildx | |
| uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 | |
| with: | |
| install: true | |
| driver-opts: network=host | |
| platforms: linux/amd64 | |
| - name: Build and export locally Docker | |
| uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0 | |
| with: | |
| context: container-action/ | |
| load: true | |
| tags: ${{ env.TEST_TAG }} | |
| # Call the composite action to set branch variables | |
| - name: Set Branch Variables | |
| uses: ./.github/actions/set-branch-variables | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Test the RIT Container Action | |
| id: test-container | |
| env: | |
| INPUT_RSKJ_BRANCH: ${{ env.RSKJ_BRANCH }} | |
| INPUT_POWPEG_NODE_BRANCH: ${{ env.POWPEG_BRANCH }} | |
| INPUT_RIT_BRANCH: ${{ env.RIT_BRANCH }} | |
| INPUT_RIT_LOG_LEVEL: info | |
| run: | | |
| docker run \ | |
| --env GITHUB_OUTPUT="/github-output" \ | |
| --env INPUT_RSKJ_BRANCH="${{ env.RSKJ_BRANCH }}" \ | |
| --env INPUT_POWPEG_NODE_BRANCH="${{ env.POWPEG_BRANCH }}" \ | |
| --env INPUT_RIT_BRANCH="${{ env.RIT_BRANCH }}" \ | |
| --env INPUT_RIT_LOG_LEVEL="${{ env.INPUT_RIT_LOG_LEVEL }}" \ | |
| -v "$GITHUB_OUTPUT:/github-output" \ | |
| --rm ${{ env.TEST_TAG }} | |
| - name: GitHub container registry login | |
| uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build the RIT Action Container Image | |
| uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0 | |
| with: | |
| context: container-action/ | |
| tags: ${{ env.LATEST_TAG }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| load: true | |
| push: true | |
| test-rit-action: | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| needs: build-push-rit-action-container-action | |
| name: GitHub Actions Test | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 150 | |
| steps: | |
| - name: Checkout | |
| id: checkout | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| # Call the composite action here to set branch variables | |
| - name: Set Branch Variables | |
| uses: ./.github/actions/set-branch-variables | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Test RIT Action | |
| id: test-rit-action | |
| uses: ./ | |
| with: | |
| rskj-branch: ${{ env.RSKJ_BRANCH }} | |
| powpeg-node-branch: ${{ env.POWPEG_BRANCH }} | |
| rit-branch: ${{ env.RIT_BRANCH }} | |
| - name: Print RIT Status and Message | |
| id: output | |
| run: | | |
| echo "RIT Status = ${{ steps.test-rit-action.outputs.status }}" | |
| echo "RIT Message = ${{ steps.test-rit-action.outputs.message }}" |