Skip to content

Commit

Permalink
first commit trying to create a join workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
guy-frontegg committed Mar 7, 2022
1 parent 18aba00 commit 997110d
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/.workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: POC for main workflow

on:
workflow_call:
inputs:

repository_name:
description: 'The repository name'
required: true
image_name:
required: true
type: string
tag:
type: string
secrets:
npm_token:
description: 'Npm Token'
type: string
required: true
docker_hub_password:
description: 'Docker Hub Password'
required: true
docker_hub_user:
description: 'Docker Hub User'
type: string
required: true

jobs:
build-docker:
name: Build and publish docker images
runs-on: ubuntu-latest
steps:
- name: Install make
run: sudo apt-get install make
shell: bash
- name: Make npmrc
run: make generate-npmrc-file NPM_TOKEN=${{ secrets.npm_token }}
shell: bash
- name: Build and push docker image
run: |
make build-docker-image NPM_TOKEN=${{ inputs.npm_token }} COMMIT_HASH=${{ github.sha }} TAG_NAME=${{ env.BRANCH_NAME }}
make push-docker-image
shell: bash
env:
COMMIT_HASH: ${{ github.sha }}
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
DOCKER_HUB_USER: ${{ secrets.docker_hub_user }}
DOCKER_HUB_PASSWORD: ${{ secrets.docker_hub_password }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,4 @@ dist

# TernJS port file
.tern-port
.idea

0 comments on commit 997110d

Please sign in to comment.