Skip to content

Commit

Permalink
Bump ghc & Debian version
Browse files Browse the repository at this point in the history
  • Loading branch information
baksetercx committed Oct 8, 2024
1 parent a977a26 commit 21252be
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 25 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/build-release-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,19 @@ on:
branches: [trunk]
paths-ignore: ['README.md']

concurrency:
group: '${{ github.workflow }}-${{ github.ref }}'

jobs:
build-release:
name: Build and release
runs-on: elvia-runner
permissions:
actions: read
contents: write
packages: write
pull-requests: write
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -26,16 +32,18 @@ jobs:
echo "MAJOR_VERSION_TAG=v$(echo $version | cut -d. -f1)" >> "$GITHUB_ENV"
- name: Build
uses: 3lvia/core-github-actions-templates/build@trunk
uses: 3lvia/core-github-actions-templates/build@fix/trivy-max-comment-length
with:
name: 'gh-actions-docs'
namespace: 'core'
project-file: 'Dockerfile'
trivy-post-comment: 'true'
trivy-upload-report: 'true'
severity: 'CRITICAL,HIGH,MEDIUM,LOW,UNKNOWN'
checkout: 'false'
registry: 'ghcr'
project-file: 'Dockerfile'
docker-cache-tag: ${{ github.event_name == 'push' && 'latest' || 'latest-cache' }}
docker-additional-tags: ${{ env.VERSION_TAG }}
ghcr-omit-repository-name: 'true'
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Create release if new version
if: ${{ github.event_name == 'push' }}
Expand Down
13 changes: 10 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM haskell:9.4.8-slim
FROM haskell:9.6-slim-bullseye

WORKDIR /opt/app

Expand All @@ -17,8 +17,15 @@ COPY LICENSE README.md ./

RUN cabal install --overwrite-policy=always

# CVE-2024-32002
# Fixes CVEs
RUN apt-get update && \
apt-get install -y --no-install-recommends git git-man
apt-get install --no-install-recommends -y \
e2fsprogs \
libcom-err2 \
libsqlite3-0 \
libss2 \
logsave \
libnghttp2-14 \
linux-libc-dev

ENTRYPOINT ["gh-actions-docs"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ The below documentation is actually generated from the `action.yml` file in this
You can run `gh-actions-docs` using locally using Docker:

```bash
docker run -v "$(pwd):/opt/app" ghcr.io/3lvia/gh-actions-docs:latest
docker run -v "$(pwd):/opt/app" ghcr.io/3lvia/core/gh-actions-docs:latest
```

## Local
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ inputs:

runs:
using: 'docker'
image: 'docker://ghcr.io/3lvia/gh-actions-docs:v1.2.2' # to update version, change this AND version in gh-actions-docs.cabal!
image: 'docker://ghcr.io/3lvia/core/gh-actions-docs:v1.2.2' # to update version, change this AND version in gh-actions-docs.cabal!
env:
README_FILE: ${{ inputs.readme-file }}
DEBUG: ${{ inputs.debug }}
Expand Down
2 changes: 1 addition & 1 deletion gh-actions-docs.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ executable gh-actions-docs
-- other-extensions:

-- Other library packages from which modules are imported.
build-depends: base ^>=4.17.2.0
build-depends: base ^>=4.18.2.1
, yaml
, aeson
, split
Expand Down
31 changes: 16 additions & 15 deletions src/Actions.hs
Original file line number Diff line number Diff line change
Expand Up @@ -103,21 +103,6 @@ prettyPrintAction config (Action name' _ description' inputs' outputs') actionMe
(if noPermissions config then "" else prettyPrintPermissions actionMetadata) ++
(if noUsage config then "" else prettyPrintUsage name' inputs' actionMetadata)

prettyPrintOutputs :: Maybe Outputs -> String
prettyPrintOutputs (Just outputs') =
"### Outputs\n" ++
"|Name|Description|\n"
++ "|-|-|\n"
++ concatMap
( \(name', ActionOutput des) ->
"`" ++ name' ++ "`"
++ "|"
++ replaceNewlinesWithSpaces des
++ "|\n"
)
(toList outputs')
++ "\n"
prettyPrintOutputs _ = ""

prettyPrintInputs :: Maybe Inputs -> String
prettyPrintInputs (Just inputs') =
Expand Down Expand Up @@ -147,6 +132,22 @@ prettyPrintDeprecationMessage (Just deprecationMessage') =
++ "_ :warning:<br><br>"
prettyPrintDeprecationMessage Nothing = ""

prettyPrintOutputs :: Maybe Outputs -> String
prettyPrintOutputs (Just outputs') =
"### Outputs\n" ++
"|Name|Description|\n"
++ "|-|-|\n"
++ concatMap
( \(name', ActionOutput des) ->
"`" ++ name' ++ "`"
++ "|"
++ replaceNewlinesWithSpaces des
++ "|\n"
)
(toList outputs')
++ "\n"
prettyPrintOutputs _ = ""

prettyPrintPermissions :: ActionMetadata -> String
prettyPrintPermissions (ActionMetadata _ _ _ _ (Just permissions')) =
"### Permissions\n"
Expand Down

0 comments on commit 21252be

Please sign in to comment.