Compare commits
10 Commits
c46793114b
...
c0e5442392
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:
|
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"
|
||||||
|
@@ -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
|
||||||
|
@@ -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 \
|
||||||
|
@@ -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
|
|
||||||
|
Reference in New Issue
Block a user