Compare commits
3 Commits
7bd987c84a
...
4ea5e4114a
Author | SHA1 | Date | |
---|---|---|---|
![]() |
4ea5e4114a | ||
![]() |
233828d402 | ||
![]() |
08524660da |
90
.gitea/workflows/ghcr-push.yml
Normal file
90
.gitea/workflows/ghcr-push.yml
Normal file
@@ -0,0 +1,90 @@
|
||||
name: Deploy to GHCR
|
||||
|
||||
# only run most recent workflow in branch
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
paths:
|
||||
- '**/*.dockerfile'
|
||||
- '.gitea/**'
|
||||
|
||||
jobs:
|
||||
build-16:
|
||||
name: Build + Publish 16
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
name: Checkout
|
||||
|
||||
- name: Set Environment
|
||||
run: |
|
||||
echo "REGISTRY=git.carlpearson.net" >> $GITEA_ENV
|
||||
echo "REPO=cwpearson" >> $GITEA_ENV
|
||||
echo "SLUG=git.carlpearson.net/cwpearson/clang-format-16" >> $GITEA_ENV
|
||||
echo "DATE=$(date +"%Y%m%d")" >> $GITEA_ENV
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
docker build -f clang-format-16.dockerfile -t "$SLUG:latest" -t "$SLUG:$DATE" .
|
||||
|
||||
- name: Publish to GHCR
|
||||
run: |
|
||||
echo '${{secrets.GIT_PASSWORD}}' | docker login $REGISTRY -u ${{secrets.GIT_USERNAME}} --password-stdin
|
||||
docker push "$SLUG:latest"
|
||||
docker push "$SLUG:$DATE"
|
||||
build-14:
|
||||
name: Build + Publish 14
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
name: Checkout
|
||||
|
||||
- name: Set Environment
|
||||
run: |
|
||||
echo "REGISTRY=git.carlpearson.net" >> $GITEA_ENV
|
||||
echo "REPO=cwpearson" >> $GITEA_ENV
|
||||
echo "SLUG=git.carlpearson.net/cwpearson/clang-format-14" >> $GITEA_ENV
|
||||
echo "DATE=$(date +"%Y%m%d")" >> $GITEA_ENV
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
docker build -f clang-format-14.dockerfile -t "$SLUG:latest" -t "$SLUG:$DATE" .
|
||||
|
||||
- name: Publish to GHCR
|
||||
run: |
|
||||
echo '${{secrets.GIT_PASSWORD}}' | docker login $REGISTRY -u ${{secrets.GIT_USERNAME}} --password-stdin
|
||||
docker push "$SLUG:latest"
|
||||
docker push "$SLUG:$DATE"
|
||||
build-8:
|
||||
name: Build + Publish 8
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
name: Checkout
|
||||
|
||||
- name: Set Environment
|
||||
run: |
|
||||
echo "REGISTRY=git.carlpearson.net" >> $GITEA_ENV
|
||||
echo "REPO=cwpearson" >> $GITEA_ENV
|
||||
echo "SLUG=git.carlpearson.net/cwpearson/clang-format-8" >> $GITEA_ENV
|
||||
echo "DATE=$(date +"%Y%m%d")" >> $GITEA_ENV
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
docker build -f clang-format-8.dockerfile -t "$SLUG:latest" -t "$SLUG:$DATE" .
|
||||
|
||||
- name: Publish to GHCR
|
||||
run: |
|
||||
echo '${{secrets.GIT_PASSWORD}}' | docker login $REGISTRY -u ${{secrets.GIT_USERNAME}} --password-stdin
|
||||
docker push "$SLUG:latest"
|
||||
docker push "$SLUG:$DATE"
|
@@ -16,7 +16,7 @@ RUN cmake -S llvm-project-14.0.6.src/llvm -B build \
|
||||
-DLLVM_ENABLE_PROJECTS='clang' \
|
||||
-DCMAKE_BUILD_TYPE=MinSizeRel \
|
||||
-DLLVM_TARGETS_TO_BUILD=""
|
||||
RUN make -C build -j$(nproc) install
|
||||
RUN make -C build install
|
||||
|
||||
# base final image off ubi8-micro
|
||||
FROM docker.io/redhat/ubi8-micro
|
||||
@@ -25,7 +25,7 @@ LABEL maintainer="Carl Pearson <me@carlpearson.net>"
|
||||
LABEL org.opencontainers.image.title="clang-format 14"
|
||||
LABEL description="A container with clang-format 14"
|
||||
LABEL org.opencontainers.image.description="A container with clang-format 14"
|
||||
LABEL org.opencontainers.image.source https://git.sr.ht/~cwpearson/clang-format
|
||||
LABEL org.opencontainers.image.source https://git.carlpearson.net/cwpearson/clang-format
|
||||
LABEL org.opencontainers.image.licenses="MIT"
|
||||
# LABEL version="1.0"
|
||||
# LABEL org.opencontainers.image.version="1.0"
|
||||
|
@@ -16,7 +16,7 @@ RUN cmake -S llvm-project-16.0.6.src/llvm -B build \
|
||||
-DLLVM_ENABLE_PROJECTS='clang' \
|
||||
-DCMAKE_BUILD_TYPE=MinSizeRel \
|
||||
-DLLVM_TARGETS_TO_BUILD=""
|
||||
RUN make -C build -j$(nproc) install
|
||||
RUN make -C build install
|
||||
|
||||
# base final image off ubi8-micro
|
||||
FROM docker.io/redhat/ubi8-micro
|
||||
@@ -25,7 +25,7 @@ LABEL maintainer="Carl Pearson <me@carlpearson.net>"
|
||||
LABEL org.opencontainers.image.title="clang-format 16"
|
||||
LABEL description="A container with clang-format 16"
|
||||
LABEL org.opencontainers.image.description="A container with clang-format 16"
|
||||
LABEL org.opencontainers.image.source https://git.sr.ht/~cwpearson/clang-format
|
||||
LABEL org.opencontainers.image.source https://git.carlpearson.net/cwpearson/clang-format
|
||||
LABEL org.opencontainers.image.licenses="MIT"
|
||||
# LABEL version="1.0"
|
||||
# LABEL org.opencontainers.image.version="1.0"
|
||||
|
@@ -19,7 +19,7 @@ RUN cmake -S llvm-8.0.1.src -B build \
|
||||
-DLLVM_ENABLE_PROJECTS='clang' \
|
||||
-DCMAKE_BUILD_TYPE=MinSizeRel \
|
||||
-DLLVM_TARGETS_TO_BUILD=""
|
||||
RUN make -C build -j$(nproc) install
|
||||
RUN make -C build install
|
||||
|
||||
# base final image off ubi8-micro
|
||||
FROM docker.io/redhat/ubi8-micro
|
||||
@@ -28,7 +28,7 @@ LABEL maintainer="Carl Pearson <me@carlpearson.net>"
|
||||
LABEL org.opencontainers.image.title="clang-format 8"
|
||||
LABEL description="A container with clang-format 8"
|
||||
LABEL org.opencontainers.image.description="A container with clang-format 8"
|
||||
LABEL org.opencontainers.image.source https://git.sr.ht/~cwpearson/clang-format
|
||||
LABEL org.opencontainers.image.source https://git.carlpearson.net/cwpearson/clang-format
|
||||
LABEL org.opencontainers.image.licenses="MIT"
|
||||
# LABEL version="1.0"
|
||||
# LABEL org.opencontainers.image.version="1.0"
|
||||
|
Reference in New Issue
Block a user