Skip to content

Merge pull request #249 from SanctumLabs/dependabot/github_actions/do… #222

Merge pull request #249 from SanctumLabs/dependabot/github_actions/do…

Merge pull request #249 from SanctumLabs/dependabot/github_actions/do… #222

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@v4.1.7
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