Skip to content

Commit

Permalink
Initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
galargh committed Mar 13, 2023
0 parents commit 3c1041e
Show file tree
Hide file tree
Showing 6 changed files with 121 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Docker
on:
push:
tags:
- '*'
workflow_dispatch:
inputs:
tag:
description: 'Tag'
required: true
default: 'latest'
jobs:
docker:
name: Docker
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/${{ github.repository }}:${{ github.event.inputs.tag || github.event.ref_name }}
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release
on:
push:
paths: [CHANGELOG.md]
branches: [main]
pull_request:
paths: [CHANGELOG.md]
branches: [main]
jobs:
release:
name: Realase
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- id: release
uses: pl-strflt/changelog-driven-release@v1
with:
path: CHANGELOG.md
draft: ${{ github.event_name == 'pull_request' }}
- if: github.event_name == 'pull_request' && steps.release.outputs.tag != ''
uses: marocchino/sticky-pull-request-comment@3d60a5b2dae89d44e0c6ddc69dd7536aec2071cd # v2.5.0
with:
header: release
recreate: true
message: |
## [${{ steps.release.outputs.tag }}](${{ steps.release.outputs.url }})
${{ steps.release.outputs.body }}
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
### Added
- Initial release
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM eclipse-temurin:11

ARG SAXON_HE_REPOSITORY=pl-strflt/Saxon-HE
ARG SAXON_HE_SHA=392d705f7d603b0cfdd4c95fddd3c0a80590a21b

ARG ANT_REPOSITORY=pl-strflt/ant
ARG ANT_SHA=06666b51cd07442d1f20547853f03a28f61207fd

RUN apt-get update && apt-get install -y unzip jq

RUN curl -L --max-redirs 5 --retry 5 --no-progress-meter --output "SaxonHE11-5J.zip" "https://raw.githubusercontent.com/${SAXON_HE_REPOSITORY}/${SAXON_HE_SHA}/11/Java/SaxonHE11-5J.zip" && \
unzip "SaxonHE11-5J.zip" -d "/opt/SaxonHE11-5J" && \
rm "SaxonHE11-5J.zip"
RUN for file in gotest.xsl junit-frames-saxon.xsl junit-noframes-saxon.xsl; do \
curl -L --max-redirs 5 --retry 5 --no-progress-meter --output "/etc/${file}" "https://raw.githubusercontent.com/${ANT_REPOSITORY}/${ANT_SHA}/src/etc/${file}"; \
done

ENTRYPOINT ["java", "-jar", "/opt/SaxonHE11-5J/saxon-he-11.5.jar"]
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Saxon

Saxon is a GitHub Action that runs the latest stable Saxon-HE distribution. It comes prepopulated with some ant XSL templates.

## Inputs

* `args`: Arguments to pass to the Saxon-HE command.

## Example Usage

See [junit-xml-to-html](https://github.com/pl-strflt/junit-xml-to-html/blob/main/action.yml) for an example of how to use this action.

The action is also distributed as a docker image at https://github.com/orgs/pl-strflt/packages/container/package/saxon

---
17 changes: 17 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# action.yml
name: 'Saxon'
description: 'Runs Saxon-HE'
inputs:
args:
description: 'Arguments to pass to the Saxon-HE command'
required: false
runs:
using: 'composite'
steps:
- id: github
uses: pl-strflt/docker-container-action/.github/actions/github@v1
- uses: pl-strflt/docker-container-action@v1
with:
repository: ${{ steps.github.outputs.action_repository }}
ref: ${{ steps.github.outputs.action_ref }}
args: ${{ inputs.args }}

0 comments on commit 3c1041e

Please sign in to comment.