Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make closer to example #1283

Merged
merged 1 commit into from
May 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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