diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dc21492f..69418993 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,24 +19,4 @@ jobs: - run: cp config.json.example config.json - run: echo '{"version":"","buildLabel":"","matchmakingBuildId":""}' > static/data/buildConfig.json - run: npm run build - - run: npm run lint - docker: - runs-on: ubuntu-latest - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - steps: - - name: Set up Docker buildx - uses: docker/setup-buildx-action@v3 - - name: Log in to container registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push - uses: docker/build-push-action@v6 - with: - platforms: linux/amd64,linux/arm64 - push: true - tags: | - ghcr.io/${{ github.repository }}:latest - ghcr.io/${{ github.repository}}:${{ github.sha }} + - run: npm run lint \ No newline at end of file diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 00000000..e4e0ebd4 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,26 @@ +name: Build Docker image +on: + push: + branches: + - main + pull_request: {} +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Set up Docker buildx + uses: docker/setup-buildx-action@v3 + - name: Log in to container registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v6 + with: + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ghcr.io/${{ github.repository }}:latest + ghcr.io/${{ github.repository}}:${{ github.sha }}