Skip to content

Merge pull request #2 from mondaycom/feat/dorsh/add_publish_image_action #1

Merge pull request #2 from mondaycom/feat/dorsh/add_publish_image_action

Merge pull request #2 from mondaycom/feat/dorsh/add_publish_image_action #1

Workflow file for this run

name: Build and Push Docker Image to ghcr.io
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get version
id: package
run: echo "::set-output name=version::$(node -p "require('./package.json').version")"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ghcr.io/${{ github.repository }}:${{ steps.package.outputs.version }}