Added web ui to edit quota for each user #38
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: Build | |
| on: | |
| push: | |
| branches: | |
| - production | |
| - light | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set Docker image tag version | |
| id: image-name | |
| run: | | |
| case "$GITHUB_REF" in | |
| refs/heads/production) | |
| TAG=latest;; | |
| refs/heads/light) | |
| TAG=light;; | |
| *) | |
| echo "Branch not recognized" >&2 | |
| exit;; | |
| esac | |
| : ${TAG:=latest} > "$GITHUB_OUTPUT" | |
| echo "tag=$TAG" >> "$GITHUB_OUTPUT" | |
| echo "name=ustclug/lug-vpn-web:$TAG" >> "$GITHUB_OUTPUT" | |
| - name: Build Docker image | |
| run: | | |
| IMAGE="${{ steps.image-name.outputs.name }}" | |
| docker pull "$IMAGE" | |
| docker build --cache-from "$IMAGE" -t build-image . | |
| - name: Push to Docker Hub | |
| if: "github.repository == 'ustclug/lug-vpn-web'" | |
| run: | | |
| IMAGE="${{ steps.image-name.outputs.name }}" | |
| docker tag build-image "$IMAGE" | |
| docker login -u "${{ secrets.DOCKER_USER }}" -p "${{ secrets.DOCKER_PASS }}" | |
| docker push "$IMAGE" |