|
5 | 5 | types: [published] |
6 | 6 |
|
7 | 7 | jobs: |
8 | | - build: |
| 8 | + build-web: |
9 | 9 | runs-on: ubuntu-latest |
10 | | - strategy: |
11 | | - matrix: |
12 | | - java_version: [8, 11, 17, 21] |
13 | 10 |
|
14 | 11 | steps: |
15 | 12 | - uses: actions/checkout@v4 |
|
22 | 19 | name=ghcr.io/${{ github.repository }}-web |
23 | 20 | name=githubyumao/mcsmanager-web,enable=${{ github.repository == 'MCSManager/MCSManager' }} |
24 | 21 |
|
| 22 | + - name: Set up Docker Buildx |
| 23 | + uses: docker/setup-buildx-action@v3 |
| 24 | + |
| 25 | + - name: Login to ghcr.io |
| 26 | + uses: docker/login-action@v3 |
| 27 | + with: |
| 28 | + registry: ghcr.io |
| 29 | + username: ${{ github.actor }} |
| 30 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 31 | + |
| 32 | + - name: Login to DockerHub |
| 33 | + if: ${{ github.repository == 'MCSManager/MCSManager' }} |
| 34 | + uses: docker/login-action@v3 |
| 35 | + with: |
| 36 | + username: ${{ secrets.DOCKER_HUB_USERNAME }} |
| 37 | + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} |
| 38 | + |
| 39 | + - name: Build and Push Web |
| 40 | + uses: docker/build-push-action@v6 |
| 41 | + with: |
| 42 | + file: dockerfile/web.dockerfile |
| 43 | + push: true |
| 44 | + tags: ${{ steps.meta_web.outputs.tags }} |
| 45 | + labels: ${{ steps.meta_web.outputs.labels }} |
| 46 | + |
| 47 | + build-daemon: |
| 48 | + runs-on: ubuntu-latest |
| 49 | + strategy: |
| 50 | + matrix: |
| 51 | + java_version: [8, 11, 17, 21] |
| 52 | + |
| 53 | + steps: |
| 54 | + - uses: actions/checkout@v4 |
| 55 | + |
25 | 56 | - name: Docker meta daemon |
26 | 57 | id: meta_daemon |
27 | 58 | uses: docker/metadata-action@v5 |
|
49 | 80 | username: ${{ secrets.DOCKER_HUB_USERNAME }} |
50 | 81 | password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} |
51 | 82 |
|
52 | | - - name: Build and Push Web |
53 | | - uses: docker/build-push-action@v6 |
54 | | - with: |
55 | | - file: dockerfile/web.dockerfile |
56 | | - push: true |
57 | | - tags: ${{ steps.meta_web.outputs.tags }} |
58 | | - labels: ${{ steps.meta_web.outputs.labels }} |
59 | | - |
60 | 83 | - name: Build and Push Daemon |
61 | 84 | uses: docker/build-push-action@v6 |
62 | 85 | with: |
|
0 commit comments