Skip to content
This repository has been archived by the owner on Feb 4, 2024. It is now read-only.

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
curtisdelicata authored Jul 3, 2023
1 parent c2ee0ca commit 79edd7c
Showing 1 changed file with 36 additions and 13 deletions.
49 changes: 36 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,41 @@
name: Publish Package to npmjs
name: ci

on:
release:
types: [published]
push:
branches:
- 'master'
deployment:
workflow_dispatch:
jobs:
build:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
-
name: Clone repository
uses: actions/checkout@v3
-
name: Login to Docker Hub
uses: docker/login-action@v2
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: liberu/genealogy-frontend
-
# Setting up Docker Buildx with docker-container driver is required
# at the moment to be able to use a subdirectory with Git context
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
# context: "{{defaultContext}}:.docker/prod/app/"
file: Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 79edd7c

Please sign in to comment.