Merge pull request #9 from scalefocus/feature/82-delete-media-option #4
Workflow file for this run
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
| on: | |
| push: | |
| tags: | |
| - v* | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| dotnet-version: 8.0.x | |
| - name: Make envfile | |
| uses: SpicyPizza/create-envfile@v2.0 | |
| with: | |
| envkey_REACT_APP_SERVER: ${{ vars.SERVER_URL }} | |
| directory: . | |
| file_name: .env | |
| - name: Restore dependencies | |
| run: npm ci | |
| - name: Build project | |
| run: npm run build | |
| - name: Write release version | |
| run: | | |
| VERSION=${GITHUB_REF_NAME#v} | |
| echo Version: $VERSION | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| - name: Build docker image | |
| run: docker build -t scalefocusad/photopixels-web:${VERSION} -f ./Dockerfile . | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
| password: ${{ secrets.DOCKER_HUB_PASS }} | |
| - name: "Push Docker image" | |
| run: docker push scalefocusad/photopixels-web:${VERSION} |