Skip to content

Merge pull request #243 from SanctumLabs/dependabot/npm_and_yarn/expr… #216

Merge pull request #243 from SanctumLabs/dependabot/npm_and_yarn/expr…

Merge pull request #243 from SanctumLabs/dependabot/npm_and_yarn/expr… #216

Workflow file for this run

# Reference:https://github.com/marketplace/actions/build-and-push-docker-images
name: Docker Image CI
on:
push:
branches: [ master, beta, develop ]
jobs:
build_application:
name: Build Server Binary
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build Application
uses: actions/setup-node@v1
with:
node-version: 13
- run: npm install
- run: npm run build
- name: Upload build artifact
continue-on-error: false
uses: actions/upload-artifact@v1
with:
name: build
path: build/server.js
push_to_registries:
name: Pushes Docker image to Dockerhub and Github Registry
needs: build_application
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download build artifact
uses: actions/download-artifact@v1
with:
name: build
- name: Push to Docker Hub
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: sanctumlabs/calamusapi
tag_with_ref: true
- name: Push to GitHub Packages
uses: docker/build-push-action@v1
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: sanctumlabs/calamus/calamusapi
tag_with_ref: true