Added new Server Panel, minor fixes (#457) #667
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: Docker; Build & Push Server Image | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - developer | |
| - long-term-support | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: ${{ github.repository_owner }}/basis-server | |
| jobs: | |
| server-build-and-push: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| with: | |
| driver-opts: | | |
| network=host | |
| - name: Log in to GitHub Container Registry | |
| if: github.event_name != 'pull_request' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract metadata | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
| tags: | | |
| # For dev branch, tag as nightly | |
| type=raw,value=nightly,enable=${{ github.ref == 'refs/heads/developer' }} | |
| # For long-term-support branch, tag as latest | |
| type=raw,value=latest,enable=${{ github.ref == 'refs/heads/long-term-support' }} | |
| # Also tag with commit SHA for both branches | |
| type=sha,prefix={{branch}}-,format=short | |
| # Tag with branch name | |
| type=ref,event=branch | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@v5 | |
| id: build | |
| with: | |
| context: "./Basis Server" | |
| file: "./Basis Server/Docker/Dockerfile" | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| build-args: | | |
| BUILDKIT_INLINE_CACHE=1 | |
| - name: Image digest | |
| run: 'echo "Image pushed with digest: ${{ steps.build.outputs.digest }}"' |