Compare commits

...

10 Commits

Author SHA1 Message Date
Carl Pearson
c0e5442392 README.md: fix volume mount typo
Some checks failed
Deploy to GHCR / Build & Publish 0.6.13 (push) Failing after 23s
2024-10-29 11:17:35 -06:00
Carl Pearson
ebff088a15 typo in readme 2024-10-22 11:50:23 -06:00
Carl Pearson
f57c9295ff Update readme 2024-09-30 13:54:28 -06:00
Carl Pearson
0f320f9481 relabel images 2024-09-30 13:48:27 -06:00
Carl Pearson
1a6ab6e58f fix bash argument handling 2024-09-30 13:44:32 -06:00
Carl Pearson
d8c76a0f5d timeout nexus check after 10s 2024-09-30 13:41:11 -06:00
Carl Pearson
583844dca7 ci: add workflow_dispatch 2024-09-30 13:38:59 -06:00
Carl Pearson
4bf3843644 ci: triggers 2024-09-30 13:37:45 -06:00
Carl Pearson
6114cb854f ci: fix build name 2024-09-30 13:34:42 -06:00
Carl Pearson
9ffc321ca4 ci: fix build name 2024-09-30 13:34:29 -06:00
4 changed files with 14 additions and 17 deletions

View File

@@ -8,12 +8,11 @@ concurrency:
on: on:
push: push:
branches: [ "master" ] branches: [ "master" ]
paths: workflow_dispatch:
- '**/*.dockerfile'
jobs: jobs:
build-0_6_13: build-06:
name: Build + Publish 16 name: "Build & Publish 0.6.13"
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
contents: read contents: read
@@ -25,15 +24,15 @@ jobs:
- name: Set Environment - name: Set Environment
run: | run: |
echo "SLUG=ghcr.io/cwpearson/cmake-format-0.6.13" >> $GITHUB_ENV echo "SLUG=ghcr.io/cwpearson/cmake-format" >> $GITHUB_ENV
echo "DATE=$(date +"%Y%m%d")" >> $GITHUB_ENV echo "DATE=$(date +"%Y%m%d")" >> $GITHUB_ENV
- name: Build - name: Build
run: | run: |
docker build -f cmake-format-0.6.13.dockerfile -t "$SLUG:latest" -t "$SLUG:$DATE" . docker build -f cmake-format-0.6.13.dockerfile -t "$SLUG:0.6.13" -t "$SLUG:0.6" .
- name: Publish to GHCR - name: Publish to GHCR
run: | run: |
echo '${{secrets.GHCR_TOKEN}}' | docker login ghcr.io -u cwpearson --password-stdin echo '${{secrets.GHCR_TOKEN}}' | docker login ghcr.io -u cwpearson --password-stdin
docker push "$SLUG:latest" docker push "$SLUG:0.6.13"
docker push "$SLUG:$DATE" docker push "$SLUG:0.6"

View File

@@ -4,7 +4,7 @@
```bash ```bash
cd your/source/tree cd your/source/tree
podman run --rm -v "${PWD}"/src ghcr.io/cwpearson/clang-format-16:latest clang-format ... podman run --rm -v "${PWD}":/src ghcr.io/cwpearson/cmake-format:0.6.13 cmake-format ...
``` ```
Inside the container, the working directory is /src, we use the volume mount to map the host working directory `${PWD}` into `/src`: `-v "${PWD}"/src`. Inside the container, the working directory is /src, we use the volume mount to map the host working directory `${PWD}` into `/src`: `-v "${PWD}"/src`.
@@ -12,8 +12,8 @@ Inside the container, the working directory is /src, we use the volume mount to
## Building the Image Locally ## Building the Image Locally
```bash ```bash
podman build -f cmake-format-0.6.13.dockerfile -t cmake-format-0.6.13:latest podman build -f cmake-format-0.6.13.dockerfile -t cmake-format:0.6.13
podman run --rm -v "${PWD}"/src cmake-format-0.6.13:latest cmake-format ... podman run --rm -v "${PWD}":/src cmake-format:0.6.13 cmake-format ...
``` ```
## Deploy ## Deploy

View File

@@ -5,7 +5,7 @@ LABEL maintainer="Carl Pearson <me@carlpearson.net>"
LABEL org.opencontainers.image.title="cmake-format 0.6" LABEL org.opencontainers.image.title="cmake-format 0.6"
LABEL description="A container with cmake-format 0.6" LABEL description="A container with cmake-format 0.6"
LABEL org.opencontainers.image.description="A container with cmake-format 0.6" LABEL org.opencontainers.image.description="A container with cmake-format 0.6"
LABEL org.opencontainers.image.source https://github.com/cwpearson/clang-format LABEL org.opencontainers.image.source https://github.com/cwpearson/cmake-format
LABEL org.opencontainers.image.licenses="GPLv3" LABEL org.opencontainers.image.licenses="GPLv3"
RUN dnf install -y \ RUN dnf install -y \

View File

@@ -4,10 +4,8 @@ set -eou pipefail
NEXUS_ROOT=https://nexus.web.sandia.gov/ NEXUS_ROOT=https://nexus.web.sandia.gov/
if curl --output /dev/null --silent --head --fail "$NEXUS_ROOT"; then if curl --output /dev/null --silent --head --fail --max-time 10 "$NEXUS_ROOT"; then
PIP_ARGS="--index-url=$NEXUS_ROOT/repository/pypi-proxy/simple" python3 -m pip install --index-url=$NEXUS_ROOT/repository/pypi-proxy/simple cmakelang==0.6.13
else else
PIP_ARGS="" python3 -m pip install cmakelang==0.6.13
fi fi
python3 -m pip install "$PIP_ARGS" cmakelang==0.6.13