Compare commits
10 Commits
c46793114b
...
master
Author | SHA1 | Date | |
---|---|---|---|
![]() |
c0e5442392 | ||
![]() |
ebff088a15 | ||
![]() |
f57c9295ff | ||
![]() |
0f320f9481 | ||
![]() |
1a6ab6e58f | ||
![]() |
d8c76a0f5d | ||
![]() |
583844dca7 | ||
![]() |
4bf3843644 | ||
![]() |
6114cb854f | ||
![]() |
9ffc321ca4 |
15
.github/workflows/ghcr-push.yml
vendored
15
.github/workflows/ghcr-push.yml
vendored
@@ -8,12 +8,11 @@ concurrency:
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
paths:
|
||||
- '**/*.dockerfile'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-0_6_13:
|
||||
name: Build + Publish 16
|
||||
build-06:
|
||||
name: "Build & Publish 0.6.13"
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -25,15 +24,15 @@ jobs:
|
||||
|
||||
- name: Set Environment
|
||||
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
|
||||
|
||||
- name: Build
|
||||
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
|
||||
run: |
|
||||
echo '${{secrets.GHCR_TOKEN}}' | docker login ghcr.io -u cwpearson --password-stdin
|
||||
docker push "$SLUG:latest"
|
||||
docker push "$SLUG:$DATE"
|
||||
docker push "$SLUG:0.6.13"
|
||||
docker push "$SLUG:0.6"
|
||||
|
@@ -4,7 +4,7 @@
|
||||
|
||||
```bash
|
||||
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`.
|
||||
@@ -12,8 +12,8 @@ Inside the container, the working directory is /src, we use the volume mount to
|
||||
## Building the Image Locally
|
||||
|
||||
```bash
|
||||
podman build -f cmake-format-0.6.13.dockerfile -t cmake-format-0.6.13:latest
|
||||
podman run --rm -v "${PWD}"/src cmake-format-0.6.13:latest cmake-format ...
|
||||
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 cmake-format ...
|
||||
```
|
||||
|
||||
## Deploy
|
||||
|
@@ -5,7 +5,7 @@ LABEL maintainer="Carl Pearson <me@carlpearson.net>"
|
||||
LABEL org.opencontainers.image.title="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.source https://github.com/cwpearson/clang-format
|
||||
LABEL org.opencontainers.image.source https://github.com/cwpearson/cmake-format
|
||||
LABEL org.opencontainers.image.licenses="GPLv3"
|
||||
|
||||
RUN dnf install -y \
|
||||
|
@@ -4,10 +4,8 @@ set -eou pipefail
|
||||
|
||||
NEXUS_ROOT=https://nexus.web.sandia.gov/
|
||||
|
||||
if curl --output /dev/null --silent --head --fail "$NEXUS_ROOT"; then
|
||||
PIP_ARGS="--index-url=$NEXUS_ROOT/repository/pypi-proxy/simple"
|
||||
if curl --output /dev/null --silent --head --fail --max-time 10 "$NEXUS_ROOT"; then
|
||||
python3 -m pip install --index-url=$NEXUS_ROOT/repository/pypi-proxy/simple cmakelang==0.6.13
|
||||
else
|
||||
PIP_ARGS=""
|
||||
python3 -m pip install cmakelang==0.6.13
|
||||
fi
|
||||
|
||||
python3 -m pip install "$PIP_ARGS" cmakelang==0.6.13
|
||||
|
Reference in New Issue
Block a user