Manual Release Docker Image Prod #4
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: Manual Release Docker Image Prod | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| semantic_release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Configure Git Credentials | |
| run: | | |
| git config --global user.email "[email protected]" | |
| git config --global user.name "semantic-release-bot" | |
| - name: Docker Login | |
| run: docker login --username ${{ secrets.GHCR_USERNAME }} --password ${{ secrets.GHCR_TOKEN }} ghcr.io | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| with: | |
| token: ${{ secrets.GHCR_TOKEN }} | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v2 | |
| with: | |
| node-version: 20 | |
| - name: Install dependencies | |
| run: | | |
| npm install --legacy-peer-deps | |
| - name: Prepare Environment files | |
| run: | | |
| cp .env.production.example .env.production | |
| - name: Get Version from package.json | |
| id: get_version | |
| run: echo "VERSION=$(jq -r '.version' package.json)" >> $GITHUB_ENV | |
| - name: Build and Push Docker Image | |
| run: | | |
| docker build . --file Dockerfile --tag ghcr.io/web3-plurality/plurality-developer-dashboard:latest \ | |
| && docker push ghcr.io/web3-plurality/plurality-developer-dashboard:latest \ | |
| && docker tag ghcr.io/web3-plurality/plurality-developer-dashboard:latest ghcr.io/web3-plurality/plurality-developer-dashboard:${{ env.VERSION }} \ | |
| && docker push ghcr.io/web3-plurality/plurality-developer-dashboard:${{ env.VERSION }} | |