Merge pull request #1280 from podverse/develop #402
This file contains 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: master-branch | |
on: | |
push: | |
branches: [ master ] | |
env: | |
REGISTRY: podverse | |
IMAGE_NAME: podverse_web | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Read node from package.json | |
uses: culshaw/read-package-node-version-actions@v1 | |
id: package-node-version | |
- name: send deploying message to Matrix Alerts room | |
uses: s3krit/[email protected] | |
with: | |
room_id: ${{ secrets.MATRIX_ALERTS_ROOM_ID }} | |
access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }} | |
message: "Deploying podverse-web ${{ steps.package-node-version.outputs.version }} to prod..." | |
server: ${{ secrets.MATRIX_SERVER }} | |
- name: Log in to the Container registry | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: build and push docker image | |
id: push | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: true | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
tags: latest,${{ steps.package-node-version.outputs.version }} |