mirror of
https://github.com/JuLi0n21/pwa-player.git
synced 2026-04-19 15:30:05 +00:00
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
name: Build Frontend Docker
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'frontend/**'
|
|
pull_request:
|
|
paths:
|
|
- 'frontend/**'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-frontend:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Download osu-server binary
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: osu-server
|
|
path: grpc-backend
|
|
|
|
- name: Build Frontend Docker image
|
|
run: |
|
|
docker build -t juli0n21/frontend-container:latest -t juli0n21/frontend-container:${{ github.sha }} ./frontend
|
|
|
|
- name: Log in to Docker Hub
|
|
env:
|
|
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
|
|
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }}
|
|
run: echo "${DOCKER_HUB_TOKEN}" | docker login -u "${DOCKER_HUB_USERNAME}" --password-stdin
|
|
|
|
- name: Push Frontend Docker image
|
|
run: |
|
|
docker push juli0n21/frontend-container:${{ github.sha }}
|
|
docker push juli0n21/frontend-container:latest
|