From 0a4f5878b50b2770fd2926c3f71f34b8bd9948e0 Mon Sep 17 00:00:00 2001 From: Bruno <15909838+thetoolsmith@users.noreply.github.com> Date: Mon, 23 Dec 2024 13:28:43 -0500 Subject: [PATCH] uncomment for PR test --- .github/build_and_publish_images.yml | 72 ++++++++++++------------ .github/build_images.yml | 84 +++++++++++++--------------- 2 files changed, 76 insertions(+), 80 deletions(-) diff --git a/.github/build_and_publish_images.yml b/.github/build_and_publish_images.yml index b8ef613..1856639 100644 --- a/.github/build_and_publish_images.yml +++ b/.github/build_and_publish_images.yml @@ -4,44 +4,44 @@ on: push: branches: - main -#jobs: -# build-publish-image: -# runs-on: ubuntu-latest -# defaults: -# run: -# working-directory: './images' -# steps: -# - name: 'Checkout GitHub Action' -# uses: actions/checkout@main -# -# - name: 'Login to GitHub Container Registry' -# uses: docker/login-action@v1 -# with: -# registry: ghcr.io -# username: ${{github.actor}} -# password: ${{secrets.GITHUB_TOKEN}} +jobs: + build-publish-image: + runs-on: ubuntu-latest + defaults: + run: + working-directory: './images' + steps: + - name: 'Checkout GitHub Action' + uses: actions/checkout@main -# - name: 'Build and Publish alpine image' -# run: | -# docker build -t ghcr.io/cfpb/regtech/sbl/alpine:3.18 -f Dockerfile-alpine . -# docker push ghcr.io/cfpb/regtech/sbl/alpine:3.18 + - name: 'Login to GitHub Container Registry' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{github.actor}} + password: ${{secrets.GITHUB_TOKEN}} -# - name: 'Build and Publish python-alpine image' -# run: | -# docker build -t ghcr.io/cfpb/regtech/sbl/python-alpine:3.12 -f Dockerfile-python-alpine . -# docker push ghcr.io/cfpb/regtech/sbl/python-alpine:3.12 + - name: 'Build and Publish alpine image' + run: | + docker build -t ghcr.io/cfpb/regtech/sbl/alpine:3.18 -f Dockerfile-alpine . + docker push ghcr.io/cfpb/regtech/sbl/alpine:3.18 -# - name: 'Build and Publish nginx-alpine image' -# run: | -# docker build -t ghcr.io/cfpb/regtech/sbl/nginx-alpine:1.27 -f Dockerfile-nginx-alpine . -# docker push ghcr.io/cfpb/regtech/sbl/nginx-alpine:1.27 + - name: 'Build and Publish python-alpine image' + run: | + docker build -t ghcr.io/cfpb/regtech/sbl/python-alpine:3.12 -f Dockerfile-python-alpine . + docker push ghcr.io/cfpb/regtech/sbl/python-alpine:3.12 -# - name: 'Build and Publish node-js-alpine image' -# run: | -# docker build -t ghcr.io/cfpb/regtech/sbl/node-js-alpine:3.20 -f Dockerfile-node-js-alpine . -# docker push ghcr.io/cfpb/regtech/sbl/node-js-alpine:3.20 + - name: 'Build and Publish nginx-alpine image' + run: | + docker build -t ghcr.io/cfpb/regtech/sbl/nginx-alpine:1.27 -f Dockerfile-nginx-alpine . + docker push ghcr.io/cfpb/regtech/sbl/nginx-alpine:1.27 -# - name: 'Build and Publish python-ubi8 image' -# run: | -# docker build -t ghcr.io/cfpb/regtech/sbl/python-ubi8:3.12 -f Dockerfile-python-ubi8 . -# docker push ghcr.io/cfpb/regtech/sbl/python-ubi8:3.12 + - name: 'Build and Publish node-js-alpine image' + run: | + docker build -t ghcr.io/cfpb/regtech/sbl/node-js-alpine:3.20 -f Dockerfile-node-js-alpine . + docker push ghcr.io/cfpb/regtech/sbl/node-js-alpine:3.20 + + - name: 'Build and Publish python-ubi8 image' + run: | + docker build -t ghcr.io/cfpb/regtech/sbl/python-ubi8:3.12 -f Dockerfile-python-ubi8 . + docker push ghcr.io/cfpb/regtech/sbl/python-ubi8:3.12 diff --git a/.github/build_images.yml b/.github/build_images.yml index b1fcab0..62c370f 100644 --- a/.github/build_images.yml +++ b/.github/build_images.yml @@ -1,47 +1,43 @@ name: Build Base Images on: - push: - branches: - - main - -# pull_request: -# branches: [main] -# workflow_dispatch: - -#jobs: -# build-images: -# runs-on: ubuntu-latest -# defaults: -# run: -# working-directory: './images' -# steps: -# - name: 'Checkout GitHub Action' -# uses: actions/checkout@main -# -# - name: 'Login to GitHub Container Registry' -# uses: docker/login-action@v1 -# with: -# registry: ghcr.io -# username: ${{github.actor}} -# password: ${{secrets.GITHUB_TOKEN}} -# -# - name: 'Build alpine image' -# run: | -# docker build -t ghcr.io/cfpb/regtech/sbl/alpine:3.18 -f Dockerfile-alpine . - -# - name: 'Build python-alpine image' -# run: | -# docker build -t ghcr.io/cfpb/regtech/sbl/python-alpine:3.12 -f Dockerfile-python-alpine . - -# - name: 'Build nginx-alpine image' -# run: | -# docker build -t ghcr.io/cfpb/regtech/sbl/nginx-alpine:1.27 -f Dockerfile-nginx-alpine. - -# - name: 'Build node-js-alpine image' -# run: | -# docker build -t ghcr.io/cfpb/regtech/sbl/node-js-alpine:3.20 -f Dockerfile-node-js-alpine . - -# - name: 'Build python-ubi8 image' -# run: | -# docker build -t ghcr.io/cfpb/regtech/sbl/python-ubi8:3.12 -f Dockerfile-python-ubi8 . + pull_request: + branches: [main] + workflow_dispatch: + +jobs: + build-images: + runs-on: ubuntu-latest + defaults: + run: + working-directory: './images' + steps: + - name: 'Checkout GitHub Action' + uses: actions/checkout@main + + - name: 'Login to GitHub Container Registry' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{github.actor}} + password: ${{secrets.GITHUB_TOKEN}} + + - name: 'Build alpine image' + run: | + docker build -t ghcr.io/cfpb/regtech/sbl/alpine:3.18 -f Dockerfile-alpine . + + - name: 'Build python-alpine image' + run: | + docker build -t ghcr.io/cfpb/regtech/sbl/python-alpine:3.12 -f Dockerfile-python-alpine . + + - name: 'Build nginx-alpine image' + run: | + docker build -t ghcr.io/cfpb/regtech/sbl/nginx-alpine:1.27 -f Dockerfile-nginx-alpine . + + - name: 'Build node-js-alpine image' + run: | + docker build -t ghcr.io/cfpb/regtech/sbl/node-js-alpine:3.20 -f Dockerfile-node-js-alpine . + + - name: 'Build python-ubi8 image' + run: | + docker build -t ghcr.io/cfpb/regtech/sbl/python-ubi8:3.12 -f Dockerfile-python-ubi8 .