Skip to content

Commit

Permalink
make closer to example
Browse files Browse the repository at this point in the history
  • Loading branch information
suorcd authored May 29, 2024
1 parent 0c74dbe commit 604bba2
Showing 1 changed file with 21 additions and 14 deletions.
35 changes: 21 additions & 14 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,46 @@ on:
push:
branches: [ master ]

env:
REGISTRY: podverse
IMAGE_NAME: podverse_web

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
-
name: Checkout
uses: actions/checkout@v4

- name: Read node from package.json
-
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
-
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
-
name: Login to Docker Hub
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
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.package-node-version.outputs.version }}
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

-
name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest

0 comments on commit 604bba2

Please sign in to comment.