Skip to content

Update Dockerfile.vscode #8

Update Dockerfile.vscode

Update Dockerfile.vscode #8

Workflow file for this run

name: Build and Deploy VSCode base image
on:
push:
branches: [main]
jobs:
build-and-release:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
strategy:
max-parallel: 1
matrix:
image: [vscode]
include:
- image: vscode
directory: vscode
dockerfile: Dockerfile.vscode
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 3
- name: Check for changes
id: check_for_changes
run: |
echo "CHANGE_COUNT=$(git diff --name-only HEAD^ HEAD | grep '${{ matrix.directory }}' | wc -l)" >> "$GITHUB_OUTPUT"
- name: Info
if: steps.check_for_changes.outputs.CHANGE_COUNT != '0'
run: |
echo "changes: ${{ steps.check_for_changes.outputs.CHANGE_COUNT }} event: ${{ github.event_name }}"
- name: Get version
if: steps.check_for_changes.outputs.CHANGE_COUNT != '0'
id: version
run: |
echo "VERSION=$(cat vscode/VERSION)" >> "$GITHUB_OUTPUT"
- name: Log in to the Container registry
if: steps.check_for_changes.outputs.CHANGE_COUNT != '0'
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
if: steps.check_for_changes.outputs.CHANGE_COUNT != '0'
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
if: steps.check_for_changes.outputs.CHANGE_COUNT != '0'
uses: docker/setup-buildx-action@v2
- name: Build and push
if: steps.check_for_changes.outputs.CHANGE_COUNT != '0'
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: ${{ matrix.directory }}
file: ${{ matrix.directory }}/${{ matrix.dockerfile }}
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/jumppad-labs/vscode:base-${{ steps.version.outputs.VERSION }}