Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions .github/workflows/oscms-ci-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Copyright (c) 2026 LG Electronics, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http:#www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

name: OpenSCMS/oscms-ci-docker
on:
push:
branches:
- main
pull_request:
workflow_dispatch:

env:
CI_REGISTRY: ghcr.io
CI_REGISTRY_IMAGE: ghcr.io/openscms/oscms-ci-docker

concurrency:
group: "${{ github.ref }}"
cancel-in-progress: true

jobs:
build-docker-ci-image:
runs-on:
- ubuntu-latest

permissions:
contents: read
packages: write
attestations: write
id-token: write

timeout-minutes: 60

steps:
- name: Checkout repository
uses: actions/checkout@v4.1.0
with:
fetch-depth: 0

- name: Login to GitHub Container Registry
uses: docker/login-action@v3.0.0
with:
registry: ${{ env.CI_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Get image metadata
id: meta
uses: docker/metadata-action@v5.0.0
with:
images: ${{ env.CI_REGISTRY_IMAGE }}
tags: |
type=raw,value=latest,enable={{ is_default_branch }}
type=ref,event=tag
type=ref,event=pr

- name: Build and push Docker image
id: push
uses: docker/build-push-action@v5.0.0
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=${{ env.CI_REGISTRY_IMAGE }}:latest
file: openscms-ci.dockerfile

- name: Image digest
run: echo ${{ steps.push.outputs.digest }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.env.local
log/
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,18 @@ This will place you in a `bash` shell within the container, with your cloned sou

## Pulling the image from GitHub

The image is published on `ghcr.io` as a public image. Simply pull it as follows

```bash
docker login ghcr.io -u YOUR_GITHUB_USERNAME
# When prompted for a password, paste your Personal Access Token (PAT)
docker pull ghcr.io/OpenSCMS/oscms-ci-docker/oscms-ci-docker:latest
docker pull ghcr.io/openscms/oscms-ci-docker:latest
```

You can then run it as shown above.
You can then run it as shown below.

```bash
docker run -ti --rm --volume $PWD:/WORK --user $(id -u):$(id -g) \
ghcr.io/openscms/oscms-ci-docker:latest
```

## Contributing

Expand Down