diff --git a/.github/workflows/docker-publish-osurx.yml b/.github/workflows/docker-publish-osurx.yml new file mode 100644 index 0000000..3e1f0f8 --- /dev/null +++ b/.github/workflows/docker-publish-osurx.yml @@ -0,0 +1,57 @@ +name: Build and Push Docker Image (osu!RX) + +on: + push: + branches: [ main ] + paths-ignore: + - '*.md' + - '**/*.md' + - 'docs/**' + +env: + IMAGE_NAME: mingxuangame/g0v0-server + +jobs: + build-and-push-osurx: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Extract metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.IMAGE_NAME }} + tags: | + type=raw,value=osurx + type=sha,prefix=osurx- + + - name: Build and push Docker image (osu!RX) + uses: docker/build-push-action@v5 + with: + context: . + file: ./Dockerfile-osurx + platforms: linux/amd64, linux/arm64 + push: true + tags: | + ${{ env.IMAGE_NAME }}:osurx + ${{ env.IMAGE_NAME }}:osurx-${{ github.sha }} + cache-from: type=gha,scope=osurx + cache-to: type=gha,mode=max,scope=osurx diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml new file mode 100644 index 0000000..d8c234b --- /dev/null +++ b/.github/workflows/docker-publish.yml @@ -0,0 +1,57 @@ +name: Build and Push Docker Image + +on: + push: + branches: [ main ] + paths-ignore: + - '*.md' + - '**/*.md' + - 'docs/**' + +env: + IMAGE_NAME: mingxuangame/g0v0-server + +jobs: + build-and-push: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Extract metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.IMAGE_NAME }} + tags: | + type=raw,value=latest + type=sha,prefix={{branch}}- + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + file: ./Dockerfile + platforms: linux/amd64, linux/arm64 + push: true + tags: | + ${{ env.IMAGE_NAME }}:latest + ${{ env.IMAGE_NAME }}:${{ github.sha }} + cache-from: type=gha + cache-to: type=gha,mode=max diff --git a/docker-compose-osurx.yml b/docker-compose-osurx.yml index bf80ccc..e51ebd5 100644 --- a/docker-compose-osurx.yml +++ b/docker-compose-osurx.yml @@ -3,7 +3,7 @@ version: '3.8' services: app: # or use - # image: mingxuangame/osu-lazer-api-osurx:latest + # image: mingxuangame/g0v0-server:osurx build: context: . dockerfile: Dockerfile-osurx diff --git a/docker-compose.yml b/docker-compose.yml index f1a3d1b..51939cd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ version: '3.8' services: app: # or use - # image: mingxuangame/osu-lazer-api:latest + # image: mingxuangame/g0v0-server:latest build: context: . dockerfile: Dockerfile