Update Containers #109
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '42 12 * * *' | |
push: | |
paths-ignore: | |
- '**/Containerfile' | |
- '**/Dockerfile' | |
- '.github/**' | |
- 'README.md' | |
name: Update Containers | |
concurrency: | |
group: dockerfiles | |
cancel-in-progress: true | |
permissions: | |
contents: write | |
jobs: | |
setup-cache: | |
name: Setup cache | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin Cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
alpine: | |
name: Build alpine | |
runs-on: ubuntu-latest | |
needs: | |
- setup-cache | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin cache | |
id: bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
- name: Checkout source | |
uses: actions/checkout@master | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
cache: false | |
- name: Login to private registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASS }} | |
- name: Configure Git | |
uses: snow-actions/[email protected] | |
with: | |
name: ${{ secrets.GIT_USERNAME }} | |
email: ${{ secrets.GIT_EMAIL }} | |
- name: Install contempt | |
if: steps.bin-cache.outputs.cache-hit != 'true' | |
run: go install github.com/greboid/contempt/cmd/[email protected] | |
- name: Update | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
SOURCE_LINK: https://github.com/greboid/dockerfiles/blob/master/ | |
run: contempt -template Containerfile.gotpl -output Containerfile --commit --build --push --project alpine . . | |
- name: Check mirror | |
uses: andstor/file-existence-action@v2 | |
id: check_mirror | |
with: | |
files: "alpine/MIRROR" | |
- name: Check if image was built | |
if: steps.check_mirror.outputs.files_exists == 'true' | |
continue-on-error: true | |
id: check_mirror_exists | |
run: buildah images $REGISTRY/$IMAGE > /dev/null 2>&1 && echo ::set-output name=status::success; true | |
- name: Login to mirror target registry | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CONTEMPT_TOKEN }} | |
- name: Retag image to mirror | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah tag $REGISTRY/alpine $MIRROR_TARGET/$MIRROR_PATH/alpine | |
- name: Mirror the image | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah push $MIRROR_TARGET/$MIRROR_PATH/alpine | |
- name: Push changes | |
uses: cutlerydrawer/action-git-try-push@v1 | |
with: | |
tries: 5 | |
baseroot: | |
name: Build baseroot | |
runs-on: ubuntu-latest | |
needs: | |
- setup-cache | |
- alpine | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin cache | |
id: bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
- name: Checkout source | |
uses: actions/checkout@master | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
cache: false | |
- name: Login to private registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASS }} | |
- name: Configure Git | |
uses: snow-actions/[email protected] | |
with: | |
name: ${{ secrets.GIT_USERNAME }} | |
email: ${{ secrets.GIT_EMAIL }} | |
- name: Install contempt | |
if: steps.bin-cache.outputs.cache-hit != 'true' | |
run: go install github.com/greboid/contempt/cmd/[email protected] | |
- name: Update | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
SOURCE_LINK: https://github.com/greboid/dockerfiles/blob/master/ | |
run: contempt -template Containerfile.gotpl -output Containerfile --commit --build --push --project baseroot . . | |
- name: Check mirror | |
uses: andstor/file-existence-action@v2 | |
id: check_mirror | |
with: | |
files: "baseroot/MIRROR" | |
- name: Check if image was built | |
if: steps.check_mirror.outputs.files_exists == 'true' | |
continue-on-error: true | |
id: check_mirror_exists | |
run: buildah images $REGISTRY/$IMAGE > /dev/null 2>&1 && echo ::set-output name=status::success; true | |
- name: Login to mirror target registry | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CONTEMPT_TOKEN }} | |
- name: Retag image to mirror | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah tag $REGISTRY/baseroot $MIRROR_TARGET/$MIRROR_PATH/baseroot | |
- name: Mirror the image | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah push $MIRROR_TARGET/$MIRROR_PATH/baseroot | |
- name: Push changes | |
uses: cutlerydrawer/action-git-try-push@v1 | |
with: | |
tries: 5 | |
golang: | |
name: Build golang | |
runs-on: ubuntu-latest | |
needs: | |
- setup-cache | |
- alpine | |
- alpine | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin cache | |
id: bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
- name: Checkout source | |
uses: actions/checkout@master | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
cache: false | |
- name: Login to private registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASS }} | |
- name: Configure Git | |
uses: snow-actions/[email protected] | |
with: | |
name: ${{ secrets.GIT_USERNAME }} | |
email: ${{ secrets.GIT_EMAIL }} | |
- name: Install contempt | |
if: steps.bin-cache.outputs.cache-hit != 'true' | |
run: go install github.com/greboid/contempt/cmd/[email protected] | |
- name: Update | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
SOURCE_LINK: https://github.com/greboid/dockerfiles/blob/master/ | |
run: contempt -template Containerfile.gotpl -output Containerfile --commit --build --push --project golang . . | |
- name: Check mirror | |
uses: andstor/file-existence-action@v2 | |
id: check_mirror | |
with: | |
files: "golang/MIRROR" | |
- name: Check if image was built | |
if: steps.check_mirror.outputs.files_exists == 'true' | |
continue-on-error: true | |
id: check_mirror_exists | |
run: buildah images $REGISTRY/$IMAGE > /dev/null 2>&1 && echo ::set-output name=status::success; true | |
- name: Login to mirror target registry | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CONTEMPT_TOKEN }} | |
- name: Retag image to mirror | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah tag $REGISTRY/golang $MIRROR_TARGET/$MIRROR_PATH/golang | |
- name: Mirror the image | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah push $MIRROR_TARGET/$MIRROR_PATH/golang | |
- name: Push changes | |
uses: cutlerydrawer/action-git-try-push@v1 | |
with: | |
tries: 5 | |
node: | |
name: Build node | |
runs-on: ubuntu-latest | |
needs: | |
- setup-cache | |
- alpine | |
- alpine | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin cache | |
id: bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
- name: Checkout source | |
uses: actions/checkout@master | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
cache: false | |
- name: Login to private registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASS }} | |
- name: Configure Git | |
uses: snow-actions/[email protected] | |
with: | |
name: ${{ secrets.GIT_USERNAME }} | |
email: ${{ secrets.GIT_EMAIL }} | |
- name: Install contempt | |
if: steps.bin-cache.outputs.cache-hit != 'true' | |
run: go install github.com/greboid/contempt/cmd/[email protected] | |
- name: Update | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
SOURCE_LINK: https://github.com/greboid/dockerfiles/blob/master/ | |
run: contempt -template Containerfile.gotpl -output Containerfile --commit --build --push --project node . . | |
- name: Check mirror | |
uses: andstor/file-existence-action@v2 | |
id: check_mirror | |
with: | |
files: "node/MIRROR" | |
- name: Check if image was built | |
if: steps.check_mirror.outputs.files_exists == 'true' | |
continue-on-error: true | |
id: check_mirror_exists | |
run: buildah images $REGISTRY/$IMAGE > /dev/null 2>&1 && echo ::set-output name=status::success; true | |
- name: Login to mirror target registry | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CONTEMPT_TOKEN }} | |
- name: Retag image to mirror | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah tag $REGISTRY/node $MIRROR_TARGET/$MIRROR_PATH/node | |
- name: Mirror the image | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah push $MIRROR_TARGET/$MIRROR_PATH/node | |
- name: Push changes | |
uses: cutlerydrawer/action-git-try-push@v1 | |
with: | |
tries: 5 | |
rust: | |
name: Build rust | |
runs-on: ubuntu-latest | |
needs: | |
- setup-cache | |
- alpine | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin cache | |
id: bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
- name: Checkout source | |
uses: actions/checkout@master | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
cache: false | |
- name: Login to private registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASS }} | |
- name: Configure Git | |
uses: snow-actions/[email protected] | |
with: | |
name: ${{ secrets.GIT_USERNAME }} | |
email: ${{ secrets.GIT_EMAIL }} | |
- name: Install contempt | |
if: steps.bin-cache.outputs.cache-hit != 'true' | |
run: go install github.com/greboid/contempt/cmd/[email protected] | |
- name: Update | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
SOURCE_LINK: https://github.com/greboid/dockerfiles/blob/master/ | |
run: contempt -template Containerfile.gotpl -output Containerfile --commit --build --push --project rust . . | |
- name: Check mirror | |
uses: andstor/file-existence-action@v2 | |
id: check_mirror | |
with: | |
files: "rust/MIRROR" | |
- name: Check if image was built | |
if: steps.check_mirror.outputs.files_exists == 'true' | |
continue-on-error: true | |
id: check_mirror_exists | |
run: buildah images $REGISTRY/$IMAGE > /dev/null 2>&1 && echo ::set-output name=status::success; true | |
- name: Login to mirror target registry | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CONTEMPT_TOKEN }} | |
- name: Retag image to mirror | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah tag $REGISTRY/rust $MIRROR_TARGET/$MIRROR_PATH/rust | |
- name: Mirror the image | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah push $MIRROR_TARGET/$MIRROR_PATH/rust | |
- name: Push changes | |
uses: cutlerydrawer/action-git-try-push@v1 | |
with: | |
tries: 5 | |
base: | |
name: Build base | |
runs-on: ubuntu-latest | |
needs: | |
- setup-cache | |
- baseroot | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin cache | |
id: bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
- name: Checkout source | |
uses: actions/checkout@master | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
cache: false | |
- name: Login to private registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASS }} | |
- name: Configure Git | |
uses: snow-actions/[email protected] | |
with: | |
name: ${{ secrets.GIT_USERNAME }} | |
email: ${{ secrets.GIT_EMAIL }} | |
- name: Install contempt | |
if: steps.bin-cache.outputs.cache-hit != 'true' | |
run: go install github.com/greboid/contempt/cmd/[email protected] | |
- name: Update | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
SOURCE_LINK: https://github.com/greboid/dockerfiles/blob/master/ | |
run: contempt -template Containerfile.gotpl -output Containerfile --commit --build --push --project base . . | |
- name: Check mirror | |
uses: andstor/file-existence-action@v2 | |
id: check_mirror | |
with: | |
files: "base/MIRROR" | |
- name: Check if image was built | |
if: steps.check_mirror.outputs.files_exists == 'true' | |
continue-on-error: true | |
id: check_mirror_exists | |
run: buildah images $REGISTRY/$IMAGE > /dev/null 2>&1 && echo ::set-output name=status::success; true | |
- name: Login to mirror target registry | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CONTEMPT_TOKEN }} | |
- name: Retag image to mirror | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah tag $REGISTRY/base $MIRROR_TARGET/$MIRROR_PATH/base | |
- name: Mirror the image | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah push $MIRROR_TARGET/$MIRROR_PATH/base | |
- name: Push changes | |
uses: cutlerydrawer/action-git-try-push@v1 | |
with: | |
tries: 5 | |
thelounge: | |
name: Build thelounge | |
runs-on: ubuntu-latest | |
needs: | |
- setup-cache | |
- node | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin cache | |
id: bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
- name: Checkout source | |
uses: actions/checkout@master | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
cache: false | |
- name: Login to private registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASS }} | |
- name: Configure Git | |
uses: snow-actions/[email protected] | |
with: | |
name: ${{ secrets.GIT_USERNAME }} | |
email: ${{ secrets.GIT_EMAIL }} | |
- name: Install contempt | |
if: steps.bin-cache.outputs.cache-hit != 'true' | |
run: go install github.com/greboid/contempt/cmd/[email protected] | |
- name: Update | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
SOURCE_LINK: https://github.com/greboid/dockerfiles/blob/master/ | |
run: contempt -template Containerfile.gotpl -output Containerfile --commit --build --push --project thelounge . . | |
- name: Check mirror | |
uses: andstor/file-existence-action@v2 | |
id: check_mirror | |
with: | |
files: "thelounge/MIRROR" | |
- name: Check if image was built | |
if: steps.check_mirror.outputs.files_exists == 'true' | |
continue-on-error: true | |
id: check_mirror_exists | |
run: buildah images $REGISTRY/$IMAGE > /dev/null 2>&1 && echo ::set-output name=status::success; true | |
- name: Login to mirror target registry | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CONTEMPT_TOKEN }} | |
- name: Retag image to mirror | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah tag $REGISTRY/thelounge $MIRROR_TARGET/$MIRROR_PATH/thelounge | |
- name: Mirror the image | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah push $MIRROR_TARGET/$MIRROR_PATH/thelounge | |
- name: Push changes | |
uses: cutlerydrawer/action-git-try-push@v1 | |
with: | |
tries: 5 | |
centauri: | |
name: Build centauri | |
runs-on: ubuntu-latest | |
needs: | |
- setup-cache | |
- golang | |
- base | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin cache | |
id: bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
- name: Checkout source | |
uses: actions/checkout@master | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
cache: false | |
- name: Login to private registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASS }} | |
- name: Configure Git | |
uses: snow-actions/[email protected] | |
with: | |
name: ${{ secrets.GIT_USERNAME }} | |
email: ${{ secrets.GIT_EMAIL }} | |
- name: Install contempt | |
if: steps.bin-cache.outputs.cache-hit != 'true' | |
run: go install github.com/greboid/contempt/cmd/[email protected] | |
- name: Update | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
SOURCE_LINK: https://github.com/greboid/dockerfiles/blob/master/ | |
run: contempt -template Containerfile.gotpl -output Containerfile --commit --build --push --project centauri . . | |
- name: Check mirror | |
uses: andstor/file-existence-action@v2 | |
id: check_mirror | |
with: | |
files: "centauri/MIRROR" | |
- name: Check if image was built | |
if: steps.check_mirror.outputs.files_exists == 'true' | |
continue-on-error: true | |
id: check_mirror_exists | |
run: buildah images $REGISTRY/$IMAGE > /dev/null 2>&1 && echo ::set-output name=status::success; true | |
- name: Login to mirror target registry | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CONTEMPT_TOKEN }} | |
- name: Retag image to mirror | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah tag $REGISTRY/centauri $MIRROR_TARGET/$MIRROR_PATH/centauri | |
- name: Mirror the image | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah push $MIRROR_TARGET/$MIRROR_PATH/centauri | |
- name: Push changes | |
uses: cutlerydrawer/action-git-try-push@v1 | |
with: | |
tries: 5 | |
dex: | |
name: Build dex | |
runs-on: ubuntu-latest | |
needs: | |
- setup-cache | |
- golang | |
- base | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin cache | |
id: bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
- name: Checkout source | |
uses: actions/checkout@master | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
cache: false | |
- name: Login to private registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASS }} | |
- name: Configure Git | |
uses: snow-actions/[email protected] | |
with: | |
name: ${{ secrets.GIT_USERNAME }} | |
email: ${{ secrets.GIT_EMAIL }} | |
- name: Install contempt | |
if: steps.bin-cache.outputs.cache-hit != 'true' | |
run: go install github.com/greboid/contempt/cmd/[email protected] | |
- name: Update | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
SOURCE_LINK: https://github.com/greboid/dockerfiles/blob/master/ | |
run: contempt -template Containerfile.gotpl -output Containerfile --commit --build --push --project dex . . | |
- name: Check mirror | |
uses: andstor/file-existence-action@v2 | |
id: check_mirror | |
with: | |
files: "dex/MIRROR" | |
- name: Check if image was built | |
if: steps.check_mirror.outputs.files_exists == 'true' | |
continue-on-error: true | |
id: check_mirror_exists | |
run: buildah images $REGISTRY/$IMAGE > /dev/null 2>&1 && echo ::set-output name=status::success; true | |
- name: Login to mirror target registry | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CONTEMPT_TOKEN }} | |
- name: Retag image to mirror | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah tag $REGISTRY/dex $MIRROR_TARGET/$MIRROR_PATH/dex | |
- name: Mirror the image | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah push $MIRROR_TARGET/$MIRROR_PATH/dex | |
- name: Push changes | |
uses: cutlerydrawer/action-git-try-push@v1 | |
with: | |
tries: 5 | |
dockercleanup: | |
name: Build dockercleanup | |
runs-on: ubuntu-latest | |
needs: | |
- setup-cache | |
- golang | |
- base | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin cache | |
id: bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
- name: Checkout source | |
uses: actions/checkout@master | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
cache: false | |
- name: Login to private registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASS }} | |
- name: Configure Git | |
uses: snow-actions/[email protected] | |
with: | |
name: ${{ secrets.GIT_USERNAME }} | |
email: ${{ secrets.GIT_EMAIL }} | |
- name: Install contempt | |
if: steps.bin-cache.outputs.cache-hit != 'true' | |
run: go install github.com/greboid/contempt/cmd/[email protected] | |
- name: Update | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
SOURCE_LINK: https://github.com/greboid/dockerfiles/blob/master/ | |
run: contempt -template Containerfile.gotpl -output Containerfile --commit --build --push --project dockercleanup . . | |
- name: Check mirror | |
uses: andstor/file-existence-action@v2 | |
id: check_mirror | |
with: | |
files: "dockercleanup/MIRROR" | |
- name: Check if image was built | |
if: steps.check_mirror.outputs.files_exists == 'true' | |
continue-on-error: true | |
id: check_mirror_exists | |
run: buildah images $REGISTRY/$IMAGE > /dev/null 2>&1 && echo ::set-output name=status::success; true | |
- name: Login to mirror target registry | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CONTEMPT_TOKEN }} | |
- name: Retag image to mirror | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah tag $REGISTRY/dockercleanup $MIRROR_TARGET/$MIRROR_PATH/dockercleanup | |
- name: Mirror the image | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah push $MIRROR_TARGET/$MIRROR_PATH/dockercleanup | |
- name: Push changes | |
uses: cutlerydrawer/action-git-try-push@v1 | |
with: | |
tries: 5 | |
dotege: | |
name: Build dotege | |
runs-on: ubuntu-latest | |
needs: | |
- setup-cache | |
- golang | |
- base | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin cache | |
id: bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
- name: Checkout source | |
uses: actions/checkout@master | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
cache: false | |
- name: Login to private registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASS }} | |
- name: Configure Git | |
uses: snow-actions/[email protected] | |
with: | |
name: ${{ secrets.GIT_USERNAME }} | |
email: ${{ secrets.GIT_EMAIL }} | |
- name: Install contempt | |
if: steps.bin-cache.outputs.cache-hit != 'true' | |
run: go install github.com/greboid/contempt/cmd/[email protected] | |
- name: Update | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
SOURCE_LINK: https://github.com/greboid/dockerfiles/blob/master/ | |
run: contempt -template Containerfile.gotpl -output Containerfile --commit --build --push --project dotege . . | |
- name: Check mirror | |
uses: andstor/file-existence-action@v2 | |
id: check_mirror | |
with: | |
files: "dotege/MIRROR" | |
- name: Check if image was built | |
if: steps.check_mirror.outputs.files_exists == 'true' | |
continue-on-error: true | |
id: check_mirror_exists | |
run: buildah images $REGISTRY/$IMAGE > /dev/null 2>&1 && echo ::set-output name=status::success; true | |
- name: Login to mirror target registry | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CONTEMPT_TOKEN }} | |
- name: Retag image to mirror | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah tag $REGISTRY/dotege $MIRROR_TARGET/$MIRROR_PATH/dotege | |
- name: Mirror the image | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah push $MIRROR_TARGET/$MIRROR_PATH/dotege | |
- name: Push changes | |
uses: cutlerydrawer/action-git-try-push@v1 | |
with: | |
tries: 5 | |
dsp: | |
name: Build dsp | |
runs-on: ubuntu-latest | |
needs: | |
- setup-cache | |
- golang | |
- base | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin cache | |
id: bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
- name: Checkout source | |
uses: actions/checkout@master | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
cache: false | |
- name: Login to private registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASS }} | |
- name: Configure Git | |
uses: snow-actions/[email protected] | |
with: | |
name: ${{ secrets.GIT_USERNAME }} | |
email: ${{ secrets.GIT_EMAIL }} | |
- name: Install contempt | |
if: steps.bin-cache.outputs.cache-hit != 'true' | |
run: go install github.com/greboid/contempt/cmd/[email protected] | |
- name: Update | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
SOURCE_LINK: https://github.com/greboid/dockerfiles/blob/master/ | |
run: contempt -template Containerfile.gotpl -output Containerfile --commit --build --push --project dsp . . | |
- name: Check mirror | |
uses: andstor/file-existence-action@v2 | |
id: check_mirror | |
with: | |
files: "dsp/MIRROR" | |
- name: Check if image was built | |
if: steps.check_mirror.outputs.files_exists == 'true' | |
continue-on-error: true | |
id: check_mirror_exists | |
run: buildah images $REGISTRY/$IMAGE > /dev/null 2>&1 && echo ::set-output name=status::success; true | |
- name: Login to mirror target registry | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CONTEMPT_TOKEN }} | |
- name: Retag image to mirror | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah tag $REGISTRY/dsp $MIRROR_TARGET/$MIRROR_PATH/dsp | |
- name: Mirror the image | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah push $MIRROR_TARGET/$MIRROR_PATH/dsp | |
- name: Push changes | |
uses: cutlerydrawer/action-git-try-push@v1 | |
with: | |
tries: 5 | |
githubmirror: | |
name: Build githubmirror | |
runs-on: ubuntu-latest | |
needs: | |
- setup-cache | |
- golang | |
- base | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin cache | |
id: bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
- name: Checkout source | |
uses: actions/checkout@master | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
cache: false | |
- name: Login to private registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASS }} | |
- name: Configure Git | |
uses: snow-actions/[email protected] | |
with: | |
name: ${{ secrets.GIT_USERNAME }} | |
email: ${{ secrets.GIT_EMAIL }} | |
- name: Install contempt | |
if: steps.bin-cache.outputs.cache-hit != 'true' | |
run: go install github.com/greboid/contempt/cmd/[email protected] | |
- name: Update | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
SOURCE_LINK: https://github.com/greboid/dockerfiles/blob/master/ | |
run: contempt -template Containerfile.gotpl -output Containerfile --commit --build --push --project githubmirror . . | |
- name: Check mirror | |
uses: andstor/file-existence-action@v2 | |
id: check_mirror | |
with: | |
files: "githubmirror/MIRROR" | |
- name: Check if image was built | |
if: steps.check_mirror.outputs.files_exists == 'true' | |
continue-on-error: true | |
id: check_mirror_exists | |
run: buildah images $REGISTRY/$IMAGE > /dev/null 2>&1 && echo ::set-output name=status::success; true | |
- name: Login to mirror target registry | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CONTEMPT_TOKEN }} | |
- name: Retag image to mirror | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah tag $REGISTRY/githubmirror $MIRROR_TARGET/$MIRROR_PATH/githubmirror | |
- name: Mirror the image | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah push $MIRROR_TARGET/$MIRROR_PATH/githubmirror | |
- name: Push changes | |
uses: cutlerydrawer/action-git-try-push@v1 | |
with: | |
tries: 5 | |
golink: | |
name: Build golink | |
runs-on: ubuntu-latest | |
needs: | |
- setup-cache | |
- golang | |
- base | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin cache | |
id: bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
- name: Checkout source | |
uses: actions/checkout@master | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
cache: false | |
- name: Login to private registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASS }} | |
- name: Configure Git | |
uses: snow-actions/[email protected] | |
with: | |
name: ${{ secrets.GIT_USERNAME }} | |
email: ${{ secrets.GIT_EMAIL }} | |
- name: Install contempt | |
if: steps.bin-cache.outputs.cache-hit != 'true' | |
run: go install github.com/greboid/contempt/cmd/[email protected] | |
- name: Update | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
SOURCE_LINK: https://github.com/greboid/dockerfiles/blob/master/ | |
run: contempt -template Containerfile.gotpl -output Containerfile --commit --build --push --project golink . . | |
- name: Check mirror | |
uses: andstor/file-existence-action@v2 | |
id: check_mirror | |
with: | |
files: "golink/MIRROR" | |
- name: Check if image was built | |
if: steps.check_mirror.outputs.files_exists == 'true' | |
continue-on-error: true | |
id: check_mirror_exists | |
run: buildah images $REGISTRY/$IMAGE > /dev/null 2>&1 && echo ::set-output name=status::success; true | |
- name: Login to mirror target registry | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CONTEMPT_TOKEN }} | |
- name: Retag image to mirror | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah tag $REGISTRY/golink $MIRROR_TARGET/$MIRROR_PATH/golink | |
- name: Mirror the image | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah push $MIRROR_TARGET/$MIRROR_PATH/golink | |
- name: Push changes | |
uses: cutlerydrawer/action-git-try-push@v1 | |
with: | |
tries: 5 | |
goplum: | |
name: Build goplum | |
runs-on: ubuntu-latest | |
needs: | |
- setup-cache | |
- golang | |
- base | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin cache | |
id: bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
- name: Checkout source | |
uses: actions/checkout@master | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
cache: false | |
- name: Login to private registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASS }} | |
- name: Configure Git | |
uses: snow-actions/[email protected] | |
with: | |
name: ${{ secrets.GIT_USERNAME }} | |
email: ${{ secrets.GIT_EMAIL }} | |
- name: Install contempt | |
if: steps.bin-cache.outputs.cache-hit != 'true' | |
run: go install github.com/greboid/contempt/cmd/[email protected] | |
- name: Update | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
SOURCE_LINK: https://github.com/greboid/dockerfiles/blob/master/ | |
run: contempt -template Containerfile.gotpl -output Containerfile --commit --build --push --project goplum . . | |
- name: Check mirror | |
uses: andstor/file-existence-action@v2 | |
id: check_mirror | |
with: | |
files: "goplum/MIRROR" | |
- name: Check if image was built | |
if: steps.check_mirror.outputs.files_exists == 'true' | |
continue-on-error: true | |
id: check_mirror_exists | |
run: buildah images $REGISTRY/$IMAGE > /dev/null 2>&1 && echo ::set-output name=status::success; true | |
- name: Login to mirror target registry | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CONTEMPT_TOKEN }} | |
- name: Retag image to mirror | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah tag $REGISTRY/goplum $MIRROR_TARGET/$MIRROR_PATH/goplum | |
- name: Mirror the image | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah push $MIRROR_TARGET/$MIRROR_PATH/goplum | |
- name: Push changes | |
uses: cutlerydrawer/action-git-try-push@v1 | |
with: | |
tries: 5 | |
httpredirect: | |
name: Build httpredirect | |
runs-on: ubuntu-latest | |
needs: | |
- setup-cache | |
- golang | |
- base | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin cache | |
id: bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
- name: Checkout source | |
uses: actions/checkout@master | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
cache: false | |
- name: Login to private registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASS }} | |
- name: Configure Git | |
uses: snow-actions/[email protected] | |
with: | |
name: ${{ secrets.GIT_USERNAME }} | |
email: ${{ secrets.GIT_EMAIL }} | |
- name: Install contempt | |
if: steps.bin-cache.outputs.cache-hit != 'true' | |
run: go install github.com/greboid/contempt/cmd/[email protected] | |
- name: Update | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
SOURCE_LINK: https://github.com/greboid/dockerfiles/blob/master/ | |
run: contempt -template Containerfile.gotpl -output Containerfile --commit --build --push --project httpredirect . . | |
- name: Check mirror | |
uses: andstor/file-existence-action@v2 | |
id: check_mirror | |
with: | |
files: "httpredirect/MIRROR" | |
- name: Check if image was built | |
if: steps.check_mirror.outputs.files_exists == 'true' | |
continue-on-error: true | |
id: check_mirror_exists | |
run: buildah images $REGISTRY/$IMAGE > /dev/null 2>&1 && echo ::set-output name=status::success; true | |
- name: Login to mirror target registry | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CONTEMPT_TOKEN }} | |
- name: Retag image to mirror | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah tag $REGISTRY/httpredirect $MIRROR_TARGET/$MIRROR_PATH/httpredirect | |
- name: Mirror the image | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah push $MIRROR_TARGET/$MIRROR_PATH/httpredirect | |
- name: Push changes | |
uses: cutlerydrawer/action-git-try-push@v1 | |
with: | |
tries: 5 | |
identd: | |
name: Build identd | |
runs-on: ubuntu-latest | |
needs: | |
- setup-cache | |
- golang | |
- base | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin cache | |
id: bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
- name: Checkout source | |
uses: actions/checkout@master | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
cache: false | |
- name: Login to private registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASS }} | |
- name: Configure Git | |
uses: snow-actions/[email protected] | |
with: | |
name: ${{ secrets.GIT_USERNAME }} | |
email: ${{ secrets.GIT_EMAIL }} | |
- name: Install contempt | |
if: steps.bin-cache.outputs.cache-hit != 'true' | |
run: go install github.com/greboid/contempt/cmd/[email protected] | |
- name: Update | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
SOURCE_LINK: https://github.com/greboid/dockerfiles/blob/master/ | |
run: contempt -template Containerfile.gotpl -output Containerfile --commit --build --push --project identd . . | |
- name: Check mirror | |
uses: andstor/file-existence-action@v2 | |
id: check_mirror | |
with: | |
files: "identd/MIRROR" | |
- name: Check if image was built | |
if: steps.check_mirror.outputs.files_exists == 'true' | |
continue-on-error: true | |
id: check_mirror_exists | |
run: buildah images $REGISTRY/$IMAGE > /dev/null 2>&1 && echo ::set-output name=status::success; true | |
- name: Login to mirror target registry | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CONTEMPT_TOKEN }} | |
- name: Retag image to mirror | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah tag $REGISTRY/identd $MIRROR_TARGET/$MIRROR_PATH/identd | |
- name: Mirror the image | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah push $MIRROR_TARGET/$MIRROR_PATH/identd | |
- name: Push changes | |
uses: cutlerydrawer/action-git-try-push@v1 | |
with: | |
tries: 5 | |
irc-bot: | |
name: Build irc-bot | |
runs-on: ubuntu-latest | |
needs: | |
- setup-cache | |
- golang | |
- base | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin cache | |
id: bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
- name: Checkout source | |
uses: actions/checkout@master | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
cache: false | |
- name: Login to private registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASS }} | |
- name: Configure Git | |
uses: snow-actions/[email protected] | |
with: | |
name: ${{ secrets.GIT_USERNAME }} | |
email: ${{ secrets.GIT_EMAIL }} | |
- name: Install contempt | |
if: steps.bin-cache.outputs.cache-hit != 'true' | |
run: go install github.com/greboid/contempt/cmd/[email protected] | |
- name: Update | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
SOURCE_LINK: https://github.com/greboid/dockerfiles/blob/master/ | |
run: contempt -template Containerfile.gotpl -output Containerfile --commit --build --push --project irc-bot . . | |
- name: Check mirror | |
uses: andstor/file-existence-action@v2 | |
id: check_mirror | |
with: | |
files: "irc-bot/MIRROR" | |
- name: Check if image was built | |
if: steps.check_mirror.outputs.files_exists == 'true' | |
continue-on-error: true | |
id: check_mirror_exists | |
run: buildah images $REGISTRY/$IMAGE > /dev/null 2>&1 && echo ::set-output name=status::success; true | |
- name: Login to mirror target registry | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CONTEMPT_TOKEN }} | |
- name: Retag image to mirror | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah tag $REGISTRY/irc-bot $MIRROR_TARGET/$MIRROR_PATH/irc-bot | |
- name: Mirror the image | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah push $MIRROR_TARGET/$MIRROR_PATH/irc-bot | |
- name: Push changes | |
uses: cutlerydrawer/action-git-try-push@v1 | |
with: | |
tries: 5 | |
irc-distribution: | |
name: Build irc-distribution | |
runs-on: ubuntu-latest | |
needs: | |
- setup-cache | |
- golang | |
- base | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin cache | |
id: bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
- name: Checkout source | |
uses: actions/checkout@master | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
cache: false | |
- name: Login to private registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASS }} | |
- name: Configure Git | |
uses: snow-actions/[email protected] | |
with: | |
name: ${{ secrets.GIT_USERNAME }} | |
email: ${{ secrets.GIT_EMAIL }} | |
- name: Install contempt | |
if: steps.bin-cache.outputs.cache-hit != 'true' | |
run: go install github.com/greboid/contempt/cmd/[email protected] | |
- name: Update | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
SOURCE_LINK: https://github.com/greboid/dockerfiles/blob/master/ | |
run: contempt -template Containerfile.gotpl -output Containerfile --commit --build --push --project irc-distribution . . | |
- name: Check mirror | |
uses: andstor/file-existence-action@v2 | |
id: check_mirror | |
with: | |
files: "irc-distribution/MIRROR" | |
- name: Check if image was built | |
if: steps.check_mirror.outputs.files_exists == 'true' | |
continue-on-error: true | |
id: check_mirror_exists | |
run: buildah images $REGISTRY/$IMAGE > /dev/null 2>&1 && echo ::set-output name=status::success; true | |
- name: Login to mirror target registry | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CONTEMPT_TOKEN }} | |
- name: Retag image to mirror | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah tag $REGISTRY/irc-distribution $MIRROR_TARGET/$MIRROR_PATH/irc-distribution | |
- name: Mirror the image | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah push $MIRROR_TARGET/$MIRROR_PATH/irc-distribution | |
- name: Push changes | |
uses: cutlerydrawer/action-git-try-push@v1 | |
with: | |
tries: 5 | |
irc-github: | |
name: Build irc-github | |
runs-on: ubuntu-latest | |
needs: | |
- setup-cache | |
- golang | |
- base | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin cache | |
id: bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
- name: Checkout source | |
uses: actions/checkout@master | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
cache: false | |
- name: Login to private registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASS }} | |
- name: Configure Git | |
uses: snow-actions/[email protected] | |
with: | |
name: ${{ secrets.GIT_USERNAME }} | |
email: ${{ secrets.GIT_EMAIL }} | |
- name: Install contempt | |
if: steps.bin-cache.outputs.cache-hit != 'true' | |
run: go install github.com/greboid/contempt/cmd/[email protected] | |
- name: Update | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
SOURCE_LINK: https://github.com/greboid/dockerfiles/blob/master/ | |
run: contempt -template Containerfile.gotpl -output Containerfile --commit --build --push --project irc-github . . | |
- name: Check mirror | |
uses: andstor/file-existence-action@v2 | |
id: check_mirror | |
with: | |
files: "irc-github/MIRROR" | |
- name: Check if image was built | |
if: steps.check_mirror.outputs.files_exists == 'true' | |
continue-on-error: true | |
id: check_mirror_exists | |
run: buildah images $REGISTRY/$IMAGE > /dev/null 2>&1 && echo ::set-output name=status::success; true | |
- name: Login to mirror target registry | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CONTEMPT_TOKEN }} | |
- name: Retag image to mirror | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah tag $REGISTRY/irc-github $MIRROR_TARGET/$MIRROR_PATH/irc-github | |
- name: Mirror the image | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah push $MIRROR_TARGET/$MIRROR_PATH/irc-github | |
- name: Push changes | |
uses: cutlerydrawer/action-git-try-push@v1 | |
with: | |
tries: 5 | |
irc-goplum: | |
name: Build irc-goplum | |
runs-on: ubuntu-latest | |
needs: | |
- setup-cache | |
- golang | |
- base | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin cache | |
id: bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
- name: Checkout source | |
uses: actions/checkout@master | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
cache: false | |
- name: Login to private registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASS }} | |
- name: Configure Git | |
uses: snow-actions/[email protected] | |
with: | |
name: ${{ secrets.GIT_USERNAME }} | |
email: ${{ secrets.GIT_EMAIL }} | |
- name: Install contempt | |
if: steps.bin-cache.outputs.cache-hit != 'true' | |
run: go install github.com/greboid/contempt/cmd/[email protected] | |
- name: Update | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
SOURCE_LINK: https://github.com/greboid/dockerfiles/blob/master/ | |
run: contempt -template Containerfile.gotpl -output Containerfile --commit --build --push --project irc-goplum . . | |
- name: Check mirror | |
uses: andstor/file-existence-action@v2 | |
id: check_mirror | |
with: | |
files: "irc-goplum/MIRROR" | |
- name: Check if image was built | |
if: steps.check_mirror.outputs.files_exists == 'true' | |
continue-on-error: true | |
id: check_mirror_exists | |
run: buildah images $REGISTRY/$IMAGE > /dev/null 2>&1 && echo ::set-output name=status::success; true | |
- name: Login to mirror target registry | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CONTEMPT_TOKEN }} | |
- name: Retag image to mirror | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah tag $REGISTRY/irc-goplum $MIRROR_TARGET/$MIRROR_PATH/irc-goplum | |
- name: Mirror the image | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah push $MIRROR_TARGET/$MIRROR_PATH/irc-goplum | |
- name: Push changes | |
uses: cutlerydrawer/action-git-try-push@v1 | |
with: | |
tries: 5 | |
irc-notifier: | |
name: Build irc-notifier | |
runs-on: ubuntu-latest | |
needs: | |
- setup-cache | |
- golang | |
- base | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin cache | |
id: bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
- name: Checkout source | |
uses: actions/checkout@master | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
cache: false | |
- name: Login to private registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASS }} | |
- name: Configure Git | |
uses: snow-actions/[email protected] | |
with: | |
name: ${{ secrets.GIT_USERNAME }} | |
email: ${{ secrets.GIT_EMAIL }} | |
- name: Install contempt | |
if: steps.bin-cache.outputs.cache-hit != 'true' | |
run: go install github.com/greboid/contempt/cmd/[email protected] | |
- name: Update | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
SOURCE_LINK: https://github.com/greboid/dockerfiles/blob/master/ | |
run: contempt -template Containerfile.gotpl -output Containerfile --commit --build --push --project irc-notifier . . | |
- name: Check mirror | |
uses: andstor/file-existence-action@v2 | |
id: check_mirror | |
with: | |
files: "irc-notifier/MIRROR" | |
- name: Check if image was built | |
if: steps.check_mirror.outputs.files_exists == 'true' | |
continue-on-error: true | |
id: check_mirror_exists | |
run: buildah images $REGISTRY/$IMAGE > /dev/null 2>&1 && echo ::set-output name=status::success; true | |
- name: Login to mirror target registry | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CONTEMPT_TOKEN }} | |
- name: Retag image to mirror | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah tag $REGISTRY/irc-notifier $MIRROR_TARGET/$MIRROR_PATH/irc-notifier | |
- name: Mirror the image | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah push $MIRROR_TARGET/$MIRROR_PATH/irc-notifier | |
- name: Push changes | |
uses: cutlerydrawer/action-git-try-push@v1 | |
with: | |
tries: 5 | |
irc-webhook: | |
name: Build irc-webhook | |
runs-on: ubuntu-latest | |
needs: | |
- setup-cache | |
- golang | |
- base | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin cache | |
id: bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
- name: Checkout source | |
uses: actions/checkout@master | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
cache: false | |
- name: Login to private registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASS }} | |
- name: Configure Git | |
uses: snow-actions/[email protected] | |
with: | |
name: ${{ secrets.GIT_USERNAME }} | |
email: ${{ secrets.GIT_EMAIL }} | |
- name: Install contempt | |
if: steps.bin-cache.outputs.cache-hit != 'true' | |
run: go install github.com/greboid/contempt/cmd/[email protected] | |
- name: Update | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
SOURCE_LINK: https://github.com/greboid/dockerfiles/blob/master/ | |
run: contempt -template Containerfile.gotpl -output Containerfile --commit --build --push --project irc-webhook . . | |
- name: Check mirror | |
uses: andstor/file-existence-action@v2 | |
id: check_mirror | |
with: | |
files: "irc-webhook/MIRROR" | |
- name: Check if image was built | |
if: steps.check_mirror.outputs.files_exists == 'true' | |
continue-on-error: true | |
id: check_mirror_exists | |
run: buildah images $REGISTRY/$IMAGE > /dev/null 2>&1 && echo ::set-output name=status::success; true | |
- name: Login to mirror target registry | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CONTEMPT_TOKEN }} | |
- name: Retag image to mirror | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah tag $REGISTRY/irc-webhook $MIRROR_TARGET/$MIRROR_PATH/irc-webhook | |
- name: Mirror the image | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah push $MIRROR_TARGET/$MIRROR_PATH/irc-webhook | |
- name: Push changes | |
uses: cutlerydrawer/action-git-try-push@v1 | |
with: | |
tries: 5 | |
legoergo: | |
name: Build legoergo | |
runs-on: ubuntu-latest | |
needs: | |
- setup-cache | |
- golang | |
- base | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin cache | |
id: bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
- name: Checkout source | |
uses: actions/checkout@master | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
cache: false | |
- name: Login to private registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASS }} | |
- name: Configure Git | |
uses: snow-actions/[email protected] | |
with: | |
name: ${{ secrets.GIT_USERNAME }} | |
email: ${{ secrets.GIT_EMAIL }} | |
- name: Install contempt | |
if: steps.bin-cache.outputs.cache-hit != 'true' | |
run: go install github.com/greboid/contempt/cmd/[email protected] | |
- name: Update | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
SOURCE_LINK: https://github.com/greboid/dockerfiles/blob/master/ | |
run: contempt -template Containerfile.gotpl -output Containerfile --commit --build --push --project legoergo . . | |
- name: Check mirror | |
uses: andstor/file-existence-action@v2 | |
id: check_mirror | |
with: | |
files: "legoergo/MIRROR" | |
- name: Check if image was built | |
if: steps.check_mirror.outputs.files_exists == 'true' | |
continue-on-error: true | |
id: check_mirror_exists | |
run: buildah images $REGISTRY/$IMAGE > /dev/null 2>&1 && echo ::set-output name=status::success; true | |
- name: Login to mirror target registry | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CONTEMPT_TOKEN }} | |
- name: Retag image to mirror | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah tag $REGISTRY/legoergo $MIRROR_TARGET/$MIRROR_PATH/legoergo | |
- name: Mirror the image | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah push $MIRROR_TARGET/$MIRROR_PATH/legoergo | |
- name: Push changes | |
uses: cutlerydrawer/action-git-try-push@v1 | |
with: | |
tries: 5 | |
linx-server: | |
name: Build linx-server | |
runs-on: ubuntu-latest | |
needs: | |
- setup-cache | |
- golang | |
- base | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin cache | |
id: bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
- name: Checkout source | |
uses: actions/checkout@master | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
cache: false | |
- name: Login to private registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASS }} | |
- name: Configure Git | |
uses: snow-actions/[email protected] | |
with: | |
name: ${{ secrets.GIT_USERNAME }} | |
email: ${{ secrets.GIT_EMAIL }} | |
- name: Install contempt | |
if: steps.bin-cache.outputs.cache-hit != 'true' | |
run: go install github.com/greboid/contempt/cmd/[email protected] | |
- name: Update | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
SOURCE_LINK: https://github.com/greboid/dockerfiles/blob/master/ | |
run: contempt -template Containerfile.gotpl -output Containerfile --commit --build --push --project linx-server . . | |
- name: Check mirror | |
uses: andstor/file-existence-action@v2 | |
id: check_mirror | |
with: | |
files: "linx-server/MIRROR" | |
- name: Check if image was built | |
if: steps.check_mirror.outputs.files_exists == 'true' | |
continue-on-error: true | |
id: check_mirror_exists | |
run: buildah images $REGISTRY/$IMAGE > /dev/null 2>&1 && echo ::set-output name=status::success; true | |
- name: Login to mirror target registry | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CONTEMPT_TOKEN }} | |
- name: Retag image to mirror | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah tag $REGISTRY/linx-server $MIRROR_TARGET/$MIRROR_PATH/linx-server | |
- name: Mirror the image | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah push $MIRROR_TARGET/$MIRROR_PATH/linx-server | |
- name: Push changes | |
uses: cutlerydrawer/action-git-try-push@v1 | |
with: | |
tries: 5 | |
miniflux: | |
name: Build miniflux | |
runs-on: ubuntu-latest | |
needs: | |
- setup-cache | |
- golang | |
- base | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin cache | |
id: bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
- name: Checkout source | |
uses: actions/checkout@master | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
cache: false | |
- name: Login to private registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASS }} | |
- name: Configure Git | |
uses: snow-actions/[email protected] | |
with: | |
name: ${{ secrets.GIT_USERNAME }} | |
email: ${{ secrets.GIT_EMAIL }} | |
- name: Install contempt | |
if: steps.bin-cache.outputs.cache-hit != 'true' | |
run: go install github.com/greboid/contempt/cmd/[email protected] | |
- name: Update | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
SOURCE_LINK: https://github.com/greboid/dockerfiles/blob/master/ | |
run: contempt -template Containerfile.gotpl -output Containerfile --commit --build --push --project miniflux . . | |
- name: Check mirror | |
uses: andstor/file-existence-action@v2 | |
id: check_mirror | |
with: | |
files: "miniflux/MIRROR" | |
- name: Check if image was built | |
if: steps.check_mirror.outputs.files_exists == 'true' | |
continue-on-error: true | |
id: check_mirror_exists | |
run: buildah images $REGISTRY/$IMAGE > /dev/null 2>&1 && echo ::set-output name=status::success; true | |
- name: Login to mirror target registry | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CONTEMPT_TOKEN }} | |
- name: Retag image to mirror | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah tag $REGISTRY/miniflux $MIRROR_TARGET/$MIRROR_PATH/miniflux | |
- name: Mirror the image | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah push $MIRROR_TARGET/$MIRROR_PATH/miniflux | |
- name: Push changes | |
uses: cutlerydrawer/action-git-try-push@v1 | |
with: | |
tries: 5 | |
postgres-15: | |
name: Build postgres-15 | |
runs-on: ubuntu-latest | |
needs: | |
- setup-cache | |
- alpine | |
- base | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin cache | |
id: bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
- name: Checkout source | |
uses: actions/checkout@master | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
cache: false | |
- name: Login to private registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASS }} | |
- name: Configure Git | |
uses: snow-actions/[email protected] | |
with: | |
name: ${{ secrets.GIT_USERNAME }} | |
email: ${{ secrets.GIT_EMAIL }} | |
- name: Install contempt | |
if: steps.bin-cache.outputs.cache-hit != 'true' | |
run: go install github.com/greboid/contempt/cmd/[email protected] | |
- name: Update | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
SOURCE_LINK: https://github.com/greboid/dockerfiles/blob/master/ | |
run: contempt -template Containerfile.gotpl -output Containerfile --commit --build --push --project postgres-15 . . | |
- name: Check mirror | |
uses: andstor/file-existence-action@v2 | |
id: check_mirror | |
with: | |
files: "postgres-15/MIRROR" | |
- name: Check if image was built | |
if: steps.check_mirror.outputs.files_exists == 'true' | |
continue-on-error: true | |
id: check_mirror_exists | |
run: buildah images $REGISTRY/$IMAGE > /dev/null 2>&1 && echo ::set-output name=status::success; true | |
- name: Login to mirror target registry | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CONTEMPT_TOKEN }} | |
- name: Retag image to mirror | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah tag $REGISTRY/postgres-15 $MIRROR_TARGET/$MIRROR_PATH/postgres-15 | |
- name: Mirror the image | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah push $MIRROR_TARGET/$MIRROR_PATH/postgres-15 | |
- name: Push changes | |
uses: cutlerydrawer/action-git-try-push@v1 | |
with: | |
tries: 5 | |
puzzles: | |
name: Build puzzles | |
runs-on: ubuntu-latest | |
needs: | |
- setup-cache | |
- golang | |
- base | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin cache | |
id: bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
- name: Checkout source | |
uses: actions/checkout@master | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
cache: false | |
- name: Login to private registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASS }} | |
- name: Configure Git | |
uses: snow-actions/[email protected] | |
with: | |
name: ${{ secrets.GIT_USERNAME }} | |
email: ${{ secrets.GIT_EMAIL }} | |
- name: Install contempt | |
if: steps.bin-cache.outputs.cache-hit != 'true' | |
run: go install github.com/greboid/contempt/cmd/[email protected] | |
- name: Update | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
SOURCE_LINK: https://github.com/greboid/dockerfiles/blob/master/ | |
run: contempt -template Containerfile.gotpl -output Containerfile --commit --build --push --project puzzles . . | |
- name: Check mirror | |
uses: andstor/file-existence-action@v2 | |
id: check_mirror | |
with: | |
files: "puzzles/MIRROR" | |
- name: Check if image was built | |
if: steps.check_mirror.outputs.files_exists == 'true' | |
continue-on-error: true | |
id: check_mirror_exists | |
run: buildah images $REGISTRY/$IMAGE > /dev/null 2>&1 && echo ::set-output name=status::success; true | |
- name: Login to mirror target registry | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CONTEMPT_TOKEN }} | |
- name: Retag image to mirror | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah tag $REGISTRY/puzzles $MIRROR_TARGET/$MIRROR_PATH/puzzles | |
- name: Mirror the image | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah push $MIRROR_TARGET/$MIRROR_PATH/puzzles | |
- name: Push changes | |
uses: cutlerydrawer/action-git-try-push@v1 | |
with: | |
tries: 5 | |
redis: | |
name: Build redis | |
runs-on: ubuntu-latest | |
needs: | |
- setup-cache | |
- alpine | |
- base | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin cache | |
id: bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
- name: Checkout source | |
uses: actions/checkout@master | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
cache: false | |
- name: Login to private registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASS }} | |
- name: Configure Git | |
uses: snow-actions/[email protected] | |
with: | |
name: ${{ secrets.GIT_USERNAME }} | |
email: ${{ secrets.GIT_EMAIL }} | |
- name: Install contempt | |
if: steps.bin-cache.outputs.cache-hit != 'true' | |
run: go install github.com/greboid/contempt/cmd/[email protected] | |
- name: Update | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
SOURCE_LINK: https://github.com/greboid/dockerfiles/blob/master/ | |
run: contempt -template Containerfile.gotpl -output Containerfile --commit --build --push --project redis . . | |
- name: Check mirror | |
uses: andstor/file-existence-action@v2 | |
id: check_mirror | |
with: | |
files: "redis/MIRROR" | |
- name: Check if image was built | |
if: steps.check_mirror.outputs.files_exists == 'true' | |
continue-on-error: true | |
id: check_mirror_exists | |
run: buildah images $REGISTRY/$IMAGE > /dev/null 2>&1 && echo ::set-output name=status::success; true | |
- name: Login to mirror target registry | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CONTEMPT_TOKEN }} | |
- name: Retag image to mirror | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah tag $REGISTRY/redis $MIRROR_TARGET/$MIRROR_PATH/redis | |
- name: Mirror the image | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah push $MIRROR_TARGET/$MIRROR_PATH/redis | |
- name: Push changes | |
uses: cutlerydrawer/action-git-try-push@v1 | |
with: | |
tries: 5 | |
registryauth: | |
name: Build registryauth | |
runs-on: ubuntu-latest | |
needs: | |
- setup-cache | |
- golang | |
- base | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin cache | |
id: bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
- name: Checkout source | |
uses: actions/checkout@master | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
cache: false | |
- name: Login to private registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASS }} | |
- name: Configure Git | |
uses: snow-actions/[email protected] | |
with: | |
name: ${{ secrets.GIT_USERNAME }} | |
email: ${{ secrets.GIT_EMAIL }} | |
- name: Install contempt | |
if: steps.bin-cache.outputs.cache-hit != 'true' | |
run: go install github.com/greboid/contempt/cmd/[email protected] | |
- name: Update | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
SOURCE_LINK: https://github.com/greboid/dockerfiles/blob/master/ | |
run: contempt -template Containerfile.gotpl -output Containerfile --commit --build --push --project registryauth . . | |
- name: Check mirror | |
uses: andstor/file-existence-action@v2 | |
id: check_mirror | |
with: | |
files: "registryauth/MIRROR" | |
- name: Check if image was built | |
if: steps.check_mirror.outputs.files_exists == 'true' | |
continue-on-error: true | |
id: check_mirror_exists | |
run: buildah images $REGISTRY/$IMAGE > /dev/null 2>&1 && echo ::set-output name=status::success; true | |
- name: Login to mirror target registry | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CONTEMPT_TOKEN }} | |
- name: Retag image to mirror | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah tag $REGISTRY/registryauth $MIRROR_TARGET/$MIRROR_PATH/registryauth | |
- name: Mirror the image | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah push $MIRROR_TARGET/$MIRROR_PATH/registryauth | |
- name: Push changes | |
uses: cutlerydrawer/action-git-try-push@v1 | |
with: | |
tries: 5 | |
soju: | |
name: Build soju | |
runs-on: ubuntu-latest | |
needs: | |
- setup-cache | |
- golang | |
- base | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin cache | |
id: bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
- name: Checkout source | |
uses: actions/checkout@master | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
cache: false | |
- name: Login to private registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASS }} | |
- name: Configure Git | |
uses: snow-actions/[email protected] | |
with: | |
name: ${{ secrets.GIT_USERNAME }} | |
email: ${{ secrets.GIT_EMAIL }} | |
- name: Install contempt | |
if: steps.bin-cache.outputs.cache-hit != 'true' | |
run: go install github.com/greboid/contempt/cmd/[email protected] | |
- name: Update | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
SOURCE_LINK: https://github.com/greboid/dockerfiles/blob/master/ | |
run: contempt -template Containerfile.gotpl -output Containerfile --commit --build --push --project soju . . | |
- name: Check mirror | |
uses: andstor/file-existence-action@v2 | |
id: check_mirror | |
with: | |
files: "soju/MIRROR" | |
- name: Check if image was built | |
if: steps.check_mirror.outputs.files_exists == 'true' | |
continue-on-error: true | |
id: check_mirror_exists | |
run: buildah images $REGISTRY/$IMAGE > /dev/null 2>&1 && echo ::set-output name=status::success; true | |
- name: Login to mirror target registry | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CONTEMPT_TOKEN }} | |
- name: Retag image to mirror | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah tag $REGISTRY/soju $MIRROR_TARGET/$MIRROR_PATH/soju | |
- name: Mirror the image | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah push $MIRROR_TARGET/$MIRROR_PATH/soju | |
- name: Push changes | |
uses: cutlerydrawer/action-git-try-push@v1 | |
with: | |
tries: 5 | |
sws: | |
name: Build sws | |
runs-on: ubuntu-latest | |
needs: | |
- setup-cache | |
- rust | |
- base | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin cache | |
id: bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
- name: Checkout source | |
uses: actions/checkout@master | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
cache: false | |
- name: Login to private registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASS }} | |
- name: Configure Git | |
uses: snow-actions/[email protected] | |
with: | |
name: ${{ secrets.GIT_USERNAME }} | |
email: ${{ secrets.GIT_EMAIL }} | |
- name: Install contempt | |
if: steps.bin-cache.outputs.cache-hit != 'true' | |
run: go install github.com/greboid/contempt/cmd/[email protected] | |
- name: Update | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
SOURCE_LINK: https://github.com/greboid/dockerfiles/blob/master/ | |
run: contempt -template Containerfile.gotpl -output Containerfile --commit --build --push --project sws . . | |
- name: Check mirror | |
uses: andstor/file-existence-action@v2 | |
id: check_mirror | |
with: | |
files: "sws/MIRROR" | |
- name: Check if image was built | |
if: steps.check_mirror.outputs.files_exists == 'true' | |
continue-on-error: true | |
id: check_mirror_exists | |
run: buildah images $REGISTRY/$IMAGE > /dev/null 2>&1 && echo ::set-output name=status::success; true | |
- name: Login to mirror target registry | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CONTEMPT_TOKEN }} | |
- name: Retag image to mirror | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah tag $REGISTRY/sws $MIRROR_TARGET/$MIRROR_PATH/sws | |
- name: Mirror the image | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah push $MIRROR_TARGET/$MIRROR_PATH/sws | |
- name: Push changes | |
uses: cutlerydrawer/action-git-try-push@v1 | |
with: | |
tries: 5 | |
watchtower: | |
name: Build watchtower | |
runs-on: ubuntu-latest | |
needs: | |
- setup-cache | |
- golang | |
- base | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin cache | |
id: bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
- name: Checkout source | |
uses: actions/checkout@master | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
cache: false | |
- name: Login to private registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASS }} | |
- name: Configure Git | |
uses: snow-actions/[email protected] | |
with: | |
name: ${{ secrets.GIT_USERNAME }} | |
email: ${{ secrets.GIT_EMAIL }} | |
- name: Install contempt | |
if: steps.bin-cache.outputs.cache-hit != 'true' | |
run: go install github.com/greboid/contempt/cmd/[email protected] | |
- name: Update | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
SOURCE_LINK: https://github.com/greboid/dockerfiles/blob/master/ | |
run: contempt -template Containerfile.gotpl -output Containerfile --commit --build --push --project watchtower . . | |
- name: Check mirror | |
uses: andstor/file-existence-action@v2 | |
id: check_mirror | |
with: | |
files: "watchtower/MIRROR" | |
- name: Check if image was built | |
if: steps.check_mirror.outputs.files_exists == 'true' | |
continue-on-error: true | |
id: check_mirror_exists | |
run: buildah images $REGISTRY/$IMAGE > /dev/null 2>&1 && echo ::set-output name=status::success; true | |
- name: Login to mirror target registry | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CONTEMPT_TOKEN }} | |
- name: Retag image to mirror | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah tag $REGISTRY/watchtower $MIRROR_TARGET/$MIRROR_PATH/watchtower | |
- name: Mirror the image | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah push $MIRROR_TARGET/$MIRROR_PATH/watchtower | |
- name: Push changes | |
uses: cutlerydrawer/action-git-try-push@v1 | |
with: | |
tries: 5 | |
webhooked: | |
name: Build webhooked | |
runs-on: ubuntu-latest | |
needs: | |
- setup-cache | |
- golang | |
- base | |
steps: | |
- name: Get Paths | |
id: go-paths | |
run: | | |
echo "go-path=$(go env GOPATH)" >> $GITHUB_OUTPUT | |
- name: Go bin cache | |
id: bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go-paths.outputs.go-path }}/bin | |
key: ${{ runner.os }}-contempt-fork-v1.7.4 | |
- name: Checkout source | |
uses: actions/checkout@master | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
cache: false | |
- name: Login to private registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASS }} | |
- name: Configure Git | |
uses: snow-actions/[email protected] | |
with: | |
name: ${{ secrets.GIT_USERNAME }} | |
email: ${{ secrets.GIT_EMAIL }} | |
- name: Install contempt | |
if: steps.bin-cache.outputs.cache-hit != 'true' | |
run: go install github.com/greboid/contempt/cmd/[email protected] | |
- name: Update | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
SOURCE_LINK: https://github.com/greboid/dockerfiles/blob/master/ | |
run: contempt -template Containerfile.gotpl -output Containerfile --commit --build --push --project webhooked . . | |
- name: Check mirror | |
uses: andstor/file-existence-action@v2 | |
id: check_mirror | |
with: | |
files: "webhooked/MIRROR" | |
- name: Check if image was built | |
if: steps.check_mirror.outputs.files_exists == 'true' | |
continue-on-error: true | |
id: check_mirror_exists | |
run: buildah images $REGISTRY/$IMAGE > /dev/null 2>&1 && echo ::set-output name=status::success; true | |
- name: Login to mirror target registry | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CONTEMPT_TOKEN }} | |
- name: Retag image to mirror | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah tag $REGISTRY/webhooked $MIRROR_TARGET/$MIRROR_PATH/webhooked | |
- name: Mirror the image | |
if: steps.check_mirror_exists.outputs.status == 'success' | |
env: | |
REGISTRY: ${{ secrets.REGISTRY }} | |
MIRROR_TARGET: ghcr.io | |
MIRROR_PATH: ${{ github.repository }} | |
run: buildah push $MIRROR_TARGET/$MIRROR_PATH/webhooked | |
- name: Push changes | |
uses: cutlerydrawer/action-git-try-push@v1 | |
with: | |
tries: 5 | |