Skip to content

Commit

Permalink
Merge pull request #4 from Kurrawong/edmond/release
Browse files Browse the repository at this point in the history
ci: add release workflow to build image
  • Loading branch information
edmondchuc authored Feb 27, 2025
2 parents 4d347a2 + 9bc084f commit 9ba2dc2
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Release

on:
release:
types:
- published

env:
IMAGE_NAME: ghcr.io/kurrawong/fuseki

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: latest

- name: Get release version
id: version
run: echo "VALUE=$(npx --yes semver ${{ github.event.release.tag_name }})" >> "$GITHUB_OUTPUT"

- name: Docker metadata
id: metadata
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

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

- name: Build container image and push
uses: docker/build-push-action@v5
with:
context: ./docker
file: ./docker/Dockerfile
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
platforms: linux/amd64,linux/arm64
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@
- RDF Delta Fuseki
- RDF Delta Server

## Container Image

The image is available as `ghcr.io/kurrawong/fuseki:<version>` where version is composed of the jena version and this container image's build version number.

For example, `ghcr.io/kurrawong/fuseki:5.2.0-0` is built on Jena Fuseki 5.2.0 and the `0` indicates the build number of this container image. If we release a new build that's still based on Jena 5.2.0, the build number will be incremented to 1 to form `ghcr.io/kurrawong/fuseki:5.2.0-1`.

See the tagged [images here](https://github.com/Kurrawong/fuseki-container-image/pkgs/container/fuseki).

## Usage

## Entrypoints
Expand Down

0 comments on commit 9ba2dc2

Please sign in to comment.