Mirror of
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

update lunaria workflow (included because stefanzweifel/auto-commit isnt pulling before commiting, so second deployment fails...

+84 -84
-83
.github/workflows/deployment-lunaria.yaml
··· 1 - name: Deployment Lunaria 2 - 3 - on: 4 - push: 5 - branches: [main] 6 - merge_group: 7 - pull_request: 8 - branches: [main] 9 - # Allows you to run this workflow manually from the Actions tab 10 - workflow_dispatch: 11 - 12 - # Automatically cancel in-progress actions on the same branch 13 - concurrency: 14 - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} 15 - cancel-in-progress: true 16 - 17 - env: 18 - REGISTRY: docker.io 19 - IMAGE_NAME: trueberryless/i18n-mutanuq 20 - NODE_VERSION: 20 21 - 22 - jobs: 23 - deployment: 24 - if: contains(github.event.head_commit.message, 'deploy') || github.event_name == 'workflow_dispatch' 25 - runs-on: ubuntu-latest 26 - permissions: 27 - contents: write 28 - steps: 29 - - name: Check out the repo 30 - uses: actions/checkout@v4 31 - with: 32 - fetch-depth: 0 33 - 34 - - name: Create tag 35 - run: echo "IMAGE_TAG=$(echo $GITHUB_REF_NAME-$GITHUB_SHA)" >> $GITHUB_ENV 36 - 37 - - name: Setup PNPM 38 - uses: pnpm/action-setup@v3 39 - with: 40 - package_json_file: ./starlight/package.json 41 - 42 - - name: Setup Node 43 - uses: actions/setup-node@v4 44 - with: 45 - node-version: 20 46 - cache: pnpm 47 - cache-dependency-path: ./starlight/pnpm-lock.yaml 48 - 49 - - name: Install dependencies 50 - run: pnpm install 51 - shell: bash 52 - working-directory: ./starlight 53 - 54 - - name: Build Lunaria Website 55 - run: pnpm run lunaria:build 56 - shell: bash 57 - working-directory: ./starlight 58 - 59 - - name: Set up Docker Buildx 60 - uses: docker/setup-buildx-action@v3 61 - 62 - - name: Log in to Docker Hub 63 - uses: docker/login-action@v3 64 - with: 65 - username: ${{ secrets.DOCKER_USERNAME }} 66 - password: ${{ secrets.DOCKER_PASSWORD }} 67 - 68 - - name: Extract metadata (tags, labels) for Docker 69 - id: meta 70 - uses: docker/metadata-action@v5 71 - with: 72 - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} 73 - 74 - - name: Build and push Docker image 75 - uses: docker/build-push-action@v6 76 - with: 77 - context: . 78 - file: ./starlight/lunaria/Dockerfile 79 - push: true 80 - tags: | 81 - ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} 82 - ${{ env.IMAGE_NAME }}:latest 83 - labels: ${{ steps.meta.outputs.labels }}
+84 -1
.github/workflows/deployment.yaml
··· 5 5 branches: [main] 6 6 workflow_dispatch: 7 7 8 - # Automatically cancel in-progress actions on the same branch 9 8 concurrency: 10 9 group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} 11 10 cancel-in-progress: true ··· 148 147 ${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}:${{ needs.image-tag.outputs.IMAGE_TAG }} 149 148 ${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}:latest 150 149 labels: ${{ steps.meta.outputs.labels }} 150 + 151 + - name: Update deployment.yaml file 152 + run: | 153 + yq eval '.spec.template.spec.containers[0].image = "${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}:${{ needs.image-tag.outputs.IMAGE_TAG }}"' -i manifest/deployment.yaml 154 + 155 + - uses: stefanzweifel/git-auto-commit-action@v4 156 + with: 157 + commit_message: "[ci] deployment" 158 + 159 + deployment-lunaria: 160 + needs: [changes, changesets, image-tag, deployment] 161 + if: > 162 + ( 163 + needs.changesets.outputs.hasChangesets == 'false' && 164 + ( 165 + contains(github.event.head_commit.message, 'deploy') || 166 + contains(github.event.head_commit.message, '[ci] release') 167 + ) 168 + ) || 169 + github.event_name == 'workflow_dispatch' 170 + runs-on: ubuntu-latest 171 + permissions: 172 + contents: write 173 + steps: 174 + - name: Check out the repo 175 + uses: actions/checkout@v4 176 + with: 177 + fetch-depth: 0 178 + 179 + - name: Setup PNPM 180 + uses: pnpm/action-setup@v3 181 + with: 182 + package_json_file: ./starlight/package.json 183 + 184 + - name: Setup Node 185 + uses: actions/setup-node@v4 186 + with: 187 + node-version: 20 188 + cache: pnpm 189 + cache-dependency-path: ./starlight/pnpm-lock.yaml 190 + 191 + - name: Install dependencies 192 + run: pnpm install 193 + shell: bash 194 + working-directory: ./starlight 195 + 196 + - name: Build Lunaria Website 197 + run: pnpm run lunaria:build 198 + shell: bash 199 + working-directory: ./starlight 200 + 201 + - name: Set up Docker Buildx 202 + uses: docker/setup-buildx-action@v3 203 + 204 + - name: Log in to Docker Hub 205 + uses: docker/login-action@v3 206 + with: 207 + username: ${{ secrets.DOCKER_USERNAME }} 208 + password: ${{ secrets.DOCKER_PASSWORD }} 209 + 210 + - name: Extract metadata (tags, labels) for Docker 211 + id: meta 212 + uses: docker/metadata-action@v5 213 + with: 214 + images: ${{ env.REGISTRY }}/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }} 215 + 216 + - name: Build and push Docker image 217 + uses: docker/build-push-action@v6 218 + with: 219 + context: . 220 + file: ./starlight/lunaria/Dockerfile 221 + push: true 222 + tags: | 223 + ${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}:${{ needs.image-tag.outputs.IMAGE_TAG }} 224 + ${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}:latest 225 + labels: ${{ steps.meta.outputs.labels }} 226 + 227 + - name: Update manifest-lunaria/deployment.yaml file 228 + run: | 229 + yq eval '.spec.template.spec.containers[0].image = "${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}:${{ needs.image-tag.outputs.IMAGE_TAG }}"' -i manifest-lunaria/deployment.yaml 230 + 231 + - uses: stefanzweifel/git-auto-commit-action@v4 232 + with: 233 + commit_message: "[ci] deployment lunaria" 151 234 152 235 release: 153 236 name: Release