name: Build Fork Image (ghcr.io) on: push: branches: [main] workflow_dispatch: permissions: contents: read packages: write jobs: build: name: Build and Push to ghcr.io runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v6 with: ref: main - name: Set up Docker Buildx uses: docker/setup-buildx-action@v4 - name: Login to GitHub Container Registry uses: docker/login-action@v4 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push uses: docker/build-push-action@v7 with: context: . target: runner-base platforms: linux/amd64 push: true tags: | ghcr.io/gi99lin/omniroute:latest cache-from: type=gha cache-to: type=gha,mode=max