v0.57.12 #49
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
| name: Publish NPM Packages | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| jobs: | |
| # publish-packages: | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - name: checkout | |
| # uses: actions/checkout@v1 | |
| # - name: Configure CI Git User | |
| # run: | | |
| # git config --global user.name 'Rajat Saxena' | |
| # git config --global user.email 'hi@sub.rajatsaxena.dev' | |
| # git remote set-url origin https://$GITHUB_ACTOR:$GITHUB_PAT@github.com/codelitdev/courselit | |
| # env: | |
| # GITHUB_PAT: ${{ secrets.PAT }} | |
| # - name: Checkout and pull branch | |
| # run: | | |
| # LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`) | |
| # git checkout $LATEST_TAG | |
| # - name: Setup pnpm | |
| # uses: pnpm/action-setup@v2 | |
| # with: | |
| # version: 8 | |
| # - name: Install Packages | |
| # run: pnpm install | |
| # - name: Authenticate with Registry | |
| # run: | | |
| # echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc | |
| # pnpm whoami | |
| # env: | |
| # NPM_TOKEN: ${{ secrets.NPM }} | |
| # - name: Build packages | |
| # run: | | |
| # pnpm --filter @courselit/icons build | |
| # pnpm --filter @courselit/common-models build | |
| # pnpm --filter @courselit/utils build | |
| # pnpm --filter @courselit/text-editor build | |
| # pnpm --filter @courselit/state-management build | |
| # pnpm --filter @courselit/components-library build | |
| # pnpm --filter @courselit/common-widgets build | |
| # - name: Publish package | |
| # run: | | |
| # pnpm publish | |
| # env: | |
| # GH_TOKEN: ${{ secrets.PAT }} | |
| # GITHUB_TOKEN: ${{ secrets.PAT }} | |
| # NPM_TOKEN: ${{ secrets.NPM }} | |
| publish-docker-images: | |
| # needs: publish-packages | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v1 | |
| - name: Checkout and pull branch | |
| run: | | |
| LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`) | |
| git checkout $LATEST_TAG | |
| - name: Setup buildx | |
| uses: docker/setup-buildx-action@v1 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v1 | |
| with: | |
| username: ${{ secrets.DOCKERNAME }} | |
| password: ${{ secrets.DOCKERTOKEN }} | |
| - name: Docker meta for the app | |
| id: metaapp | |
| uses: docker/metadata-action@v3 | |
| with: | |
| images: codelit/courselit-app | |
| - name: Docker meta for the queue | |
| id: metaqueue | |
| uses: docker/metadata-action@v3 | |
| with: | |
| images: codelit/courselit-queue | |
| - name: Build and push app | |
| id: docker_build_app | |
| uses: docker/build-push-action@v2 | |
| with: | |
| context: . | |
| file: ./services/app/Dockerfile | |
| push: true | |
| tags: ${{ steps.metaapp.outputs.tags }} | |
| - name: Image digest | |
| run: echo ${{ steps.docker_build_app.outputs.digest }} | |
| - name: Build and push queue | |
| id: docker_build_queue | |
| uses: docker/build-push-action@v2 | |
| with: | |
| context: . | |
| file: ./services/queue/Dockerfile | |
| push: true | |
| tags: ${{ steps.metaqueue.outputs.tags }} | |
| - name: Image digest | |
| run: echo ${{ steps.docker_build_queue.outputs.digest }} |