Remove stale import #220
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: Deploy Images to GHCR | |
| on: | |
| push: | |
| branches: | |
| - v2 | |
| workflow_dispatch: | |
| jobs: | |
| push-image: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ steps.build.outputs.version }} | |
| steps: | |
| - uses: neoforged/actions/checkout@main | |
| - name: Use Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| cache: 'npm' | |
| cache-dependency-path: web-interface/package-lock.json | |
| - name: Build Web Interface | |
| working-directory: web-interface | |
| run: | | |
| npm ci | |
| npm run generate | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Make gradlew executable | |
| run: chmod +x ./gradlew | |
| - name: Build with Gradle Wrapper | |
| id: build | |
| run: ./gradlew :configureGitHubActions :build :shadowJar | |
| - name: Setup Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ github.token }} | |
| - name: Create Docker Metadata | |
| id: docker_metadata | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ghcr.io/${{ github.repository }} | |
| # custom latest tag, the rest are default values | |
| tags: | | |
| type=raw,value=latest,enable={{is_default_branch}} | |
| type=schedule | |
| type=ref,event=branch | |
| type=ref,event=tag | |
| type=ref,event=pr | |
| - name: Build Docker Image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| push: true | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| tags: ${{ steps.docker_metadata.outputs.tags }} | |
| labels: ${{ steps.docker_metadata.outputs.labels }} | |
| notify-build-end: | |
| name: Build notifications (end) | |
| needs: [ "push-image" ] | |
| if: ${{ always() }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: neoforged/action-webhooks@v1 | |
| name: Send Discord end notification | |
| with: | |
| webhook_url: ${{ secrets.DISCORD_WEBHOOK }} | |
| status: ${{ needs.push-image.result }} | |
| version: ${{ needs.push-image.outputs.version }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |