|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: ['main'] |
| 6 | + tags: |
| 7 | + - 'v0.7.*' |
| 8 | + - 's0.7.*' |
| 9 | + pull_request: |
| 10 | + branches: ['main'] |
| 11 | + |
| 12 | +jobs: |
| 13 | + build: |
| 14 | + runs-on: ubuntu-latest |
| 15 | + steps: |
| 16 | + - uses: actions/checkout@v3 |
| 17 | + with: |
| 18 | + fetch-depth: 2 |
| 19 | + - uses: actions/setup-node@v3 |
| 20 | + with: |
| 21 | + node-version: 22 |
| 22 | + - name: Verify Change Logs |
| 23 | + run: node common/scripts/install-run-rush.js change --verify |
| 24 | + - name: Rush Install |
| 25 | + run: node common/scripts/install-run-rush.js install |
| 26 | + - name: Rush validate |
| 27 | + run: node common/scripts/install-run-rush.js validate --verbose |
| 28 | + |
| 29 | + publish: |
| 30 | + runs-on: ubuntu-latest |
| 31 | + if: startsWith(github.ref, 'refs/tags/v0.7.') || startsWith(github.ref, 'refs/tags/s0.7.') |
| 32 | + steps: |
| 33 | + - uses: actions/checkout@v3 |
| 34 | + with: |
| 35 | + fetch-depth: 2 |
| 36 | + - uses: actions/setup-node@v3 |
| 37 | + with: |
| 38 | + node-version: 22 |
| 39 | + - name: Install dependencies |
| 40 | + run: node common/scripts/install-run-rush.js install |
| 41 | + - name: Rush validate |
| 42 | + run: node common/scripts/install-run-rush.js validate --verbose |
| 43 | + - name: Publish packages |
| 44 | + env: |
| 45 | + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
| 46 | + run: node common/scripts/install-run-rush.js publish --include-all --publish |
| 47 | + |
| 48 | + docker: |
| 49 | + runs-on: ubuntu-latest |
| 50 | + timeout-minutes: 60 |
| 51 | + steps: |
| 52 | + - name: Set up QEMU |
| 53 | + uses: docker/setup-qemu-action@v3 |
| 54 | + - name: Configure docker |
| 55 | + uses: docker/setup-docker-action@v4 |
| 56 | + with: |
| 57 | + daemon-config: | |
| 58 | + { |
| 59 | + "features": { |
| 60 | + "containerd-snapshotter": true |
| 61 | + } |
| 62 | + } |
| 63 | + - uses: actions/checkout@v3 |
| 64 | + with: |
| 65 | + fetch-depth: 2 |
| 66 | + - uses: actions/setup-node@v3 |
| 67 | + with: |
| 68 | + node-version: 22 |
| 69 | + - name: Verify Change Logs |
| 70 | + run: node common/scripts/install-run-rush.js change --verify |
| 71 | + - name: Rush Install |
| 72 | + run: node common/scripts/install-run-rush.js install |
| 73 | + - name: Rush validate |
| 74 | + run: node common/scripts/install-run-rush.js validate --verbose |
| 75 | + |
| 76 | + - name: Docker build |
| 77 | + run: | |
| 78 | + node common/scripts/install-run-rush.js docker:build -v |
| 79 | + docker builder prune -a -f |
| 80 | + env: |
| 81 | + DOCKER_CLI_HINTS: false |
| 82 | + DOCKER_EXTRA: --platform=linux/amd64,linux/arm64 |
| 83 | + - name: Login to Docker Hub |
| 84 | + if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/s') }} |
| 85 | + uses: docker/login-action@v3 |
| 86 | + with: |
| 87 | + username: hardcoreeng |
| 88 | + password: ${{ secrets.DOCKER_ACCESS_TOKEN }} |
| 89 | + - name: Docker push tag |
| 90 | + if: ${{ startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/s') }} |
| 91 | + run: | |
| 92 | + echo Pushing release of tag ${{ github.ref }} |
| 93 | + node common/scripts/install-run-rush.js docker:push -v |
0 commit comments