diff --git a/.github/workflows/npm-build-branches.yml b/.github/workflows/npm-build-branches.yml index d6eaa55..70bcab6 100644 --- a/.github/workflows/npm-build-branches.yml +++ b/.github/workflows/npm-build-branches.yml @@ -17,6 +17,5 @@ jobs: - run: npm ci - name: Install Playwright Browsers run: npx playwright install --with-deps - - run: npm run build --if-present - run: npm test diff --git a/.github/workflows/npm-build.yml b/.github/workflows/npm-build.yml index b123aa3..834f1bc 100644 --- a/.github/workflows/npm-build.yml +++ b/.github/workflows/npm-build.yml @@ -17,5 +17,28 @@ jobs: - run: npm ci - name: Install Playwright Browsers run: npx playwright install --with-deps - - run: npm run build --if-present - run: npm test + - run: npm run build --if-present + - name: Extract deck version + id: deckversion + run: + echo "deck_version=$(npm run --silent currentversion 2> /dev/null);" >> $GITHUB_OUTPUT + - name: Log in to registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{secrets.GETMYDECK_USER}}' + password: '${{secrets.GETMYDECK_TOKEN}}' + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + file: ./Dockerfile + push: true + tags: ${{ steps.deckversion.outputs.deck_version }} + - name: Bump version + run: | + npm version patch -m "[skip ci] release" + git push origin main + git push --tags origin main + diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 99d853d..51f7107 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,7 +17,7 @@ build: - npm run --silent currentversion 2> /dev/null - > if [ "$CI_COMMIT_REF_NAME" == "main" ]; then - echo "export DECK_VERSION=$(npm run --silent currentversion 2> /dev/null);" > version-vars.sh + echo "export DECK_VERSION=$(npm run --silent currentversion 2> /dev/null);" >> $GITHUB_OUTPUT else echo "export DECK_VERSION=$(npm run --silent currentversion 2> /dev/null)-SNAPSHOT;" > version-vars.sh fi diff --git a/README.md b/README.md index bf46e34..a30527a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # GetMyDeck-App -![Build](https://github.com/chrisingenhaag/getmydeck-app/actions/workflows/gradle-build.yml/badge.svg?branch=main) +![Build](https://github.com/chrisingenhaag/getmydeck-app/actions/workflows/npm-build.yml/badge.svg?branch=main) SvelteKit based web frontend for [getmydeck.ingenhaag.dev](https://getmydeck.ingenhaag.dev)