Skip to content

📦 Create and publish node-vscode Docker image #14

📦 Create and publish node-vscode Docker image

📦 Create and publish node-vscode Docker image #14

name: 📦 Create and publish node-vscode Docker image
on:
workflow_dispatch:
schedule:
# build every month
- cron: "0 0 1 * *"
push:
branches:
- main
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-including-paths
paths:
- '.github/workflows/build-publish-node-vscode.yml'
- 'docker/vscode/**'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}-node-vscode
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: docker/vscode
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest