Skip to content

Dev container with vscode/Intellij configuration #14

Dev container with vscode/Intellij configuration

Dev container with vscode/Intellij configuration #14

# SPDX-FileCopyrightText: 2023 SUSE LLC
#
# SPDX-License-Identifier: Apache-2.0
name: 'pre-built devcontainer'
on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- master
jobs:
devcontainer-build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
packages: write
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- name: Compute tag for devcontainer image
id: meta
run: |
tag=$(git rev-parse --short HEAD)
echo "tag=$tag" >> "$GITHUB_OUTPUT"
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and release devcontainer
run: |
npm install -g @devcontainers/cli
devcontainer build \
--workspace-folder . \
--image-name ghcr.io/${{ github.repository }}/devcontainer:${{ steps.meta.outputs.tag }} \
--image-name ghcr.io/${{ github.repository }}/devcontainer:latest \
--push
env:
BUILDX_NO_DEFAULT_ATTESTATIONS: true