feat: create Docker image, set up Docker CI #528

Merged
sw5ciprl merged 8 commits from main into main 2024-10-10 13:07:37 -07:00
2 changed files with 27 additions and 21 deletions
Showing only changes of commit 1818c26a71 - Show all commits

View File

@ -20,23 +20,3 @@ jobs:
- 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 }}

26
.github/workflows/docker.yml vendored Normal file
View File

@ -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 }}