Skip to content

Commit

Permalink
debug mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
zakkg3 committed Sep 6, 2023
1 parent 507ac4d commit a57560c
Show file tree
Hide file tree
Showing 2 changed files with 156 additions and 78 deletions.
156 changes: 78 additions & 78 deletions .github/workflows/on_tag_build.yaml
Original file line number Diff line number Diff line change
@@ -1,78 +1,78 @@
# Docker build images on tag
name: Build and Push Image
on:
push:
tags:
- '*'
# echo "Tag name from GITHUB_REF_NAME: $GITHUB_REF_NAME"
# echo "Tag name from github.ref_name: ${{ github.ref_name }}"

env:
IMAGE_TAGS: latest ${{ github.sha }} ${{ github.ref_name }}
REGISTRY_USER: clustersecret
IMAGE_REGISTRY: quay.io
IMAGE_NAMESPACE : clustersecret
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}

jobs:
login:
name: Log in to image registry
runs-on: ubuntu-20.04
steps:
- name: Log in to Quay.io
uses: redhat-actions/podman-login@v1
with:
username: clustersecret
password: ${{ secrets.REGISTRY_PASSWORD }}
registry: quay.io/clustersecret

build-push-quay:
name: Build and push manifest
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
install_latest: [ true ]
# install_latest: [ true, false ]

steps:
# Checkout push-to-registry action github repository
- name: Checkout Push to Registry action
uses: actions/checkout@v2

- name: Install latest podman
if: matrix.install_latest
run: |
bash .github/install_latest_podman.sh
- name: Install qemu dependency
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
- name: Build Image
id: build_image
uses: redhat-actions/buildah-build@main
with:
image: ${{ env.IMAGE_NAMESPACE }}
tags: ${{ env.IMAGE_TAGS }}
platforms: linux/386, linux/amd64, linux/arm64, linux/ppc64le, linux/s390x, linux/arm/v5, linux/arm/v7, linux/arm64/v8
containerfiles: |
./Dockerfile.gh
# Push the image manifest to Quay.io (Image Registry)
- name: Push To Quay
uses: ./
id: push
with:
image: ${{ steps.build_image.outputs.image }}
tags: ${{ steps.build_image.outputs.tags }}
registry: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAMESPACE }}
# username: ${{ secrets.REGISTRY_USER }}
# password: ${{ secrets.REGISTRY_PASSWORD }}

- name: Echo outputs
run: |
echo "${{ toJSON(steps.push.outputs) }}"
# # Docker build images on tag
# name: Build and Push Image
# on:
# push:
# tags:
# - '*'
# # echo "Tag name from GITHUB_REF_NAME: $GITHUB_REF_NAME"
# # echo "Tag name from github.ref_name: ${{ github.ref_name }}"
#
# env:
# IMAGE_TAGS: latest ${{ github.sha }} ${{ github.ref_name }}
# REGISTRY_USER: clustersecret
# IMAGE_REGISTRY: quay.io
# IMAGE_NAMESPACE : clustersecret
# REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
#
# jobs:
#
# login:
# name: Log in to image registry
# runs-on: ubuntu-20.04
# steps:
# - name: Log in to Quay.io
# uses: redhat-actions/podman-login@v1
# with:
# username: clustersecret
# password: ${{ secrets.REGISTRY_PASSWORD }}
# registry: quay.io/clustersecret
#
# build-push-quay:
# name: Build and push manifest
# runs-on: ubuntu-20.04
# strategy:
# fail-fast: false
# matrix:
# install_latest: [ true ]
# # install_latest: [ true, false ]
#
# steps:
# # Checkout push-to-registry action github repository
# - name: Checkout Push to Registry action
# uses: actions/checkout@v2
#
# - name: Install latest podman
# if: matrix.install_latest
# run: |
# bash .github/install_latest_podman.sh
#
# - name: Install qemu dependency
# run: |
# sudo apt-get update
# sudo apt-get install -y qemu-user-static
#
#
# - name: Build Image
# id: build_image
# uses: redhat-actions/buildah-build@main
# with:
# image: ${{ env.IMAGE_NAMESPACE }}
# tags: ${{ env.IMAGE_TAGS }}
# platforms: linux/386, linux/amd64, linux/arm64, linux/ppc64le, linux/s390x, linux/arm/v5, linux/arm/v7, linux/arm64/v8
# containerfiles: |
# ./Dockerfile.gh
#
# # Push the image manifest to Quay.io (Image Registry)
# - name: Push To Quay
# uses: ./
# id: push
# with:
# image: ${{ steps.build_image.outputs.image }}
# tags: ${{ steps.build_image.outputs.tags }}
# registry: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAMESPACE }}
# # username: ${{ secrets.REGISTRY_USER }}
# # password: ${{ secrets.REGISTRY_PASSWORD }}
#
# - name: Echo outputs
# run: |
# echo "${{ toJSON(steps.push.outputs) }}"
78 changes: 78 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Docker build images on tag
name: Build and Push Image
on:
push:
tags:
- '*'
# echo "Tag name from GITHUB_REF_NAME: $GITHUB_REF_NAME"
# echo "Tag name from github.ref_name: ${{ github.ref_name }}"

env:
IMAGE_TAGS: latest ${{ github.sha }} ${{ github.ref_name }}
REGISTRY_USER: clustersecret
IMAGE_REGISTRY: quay.io
IMAGE_NAMESPACE : clustersecret
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}

jobs:

login:
name: Log in to image registry
runs-on: ubuntu-20.04
steps:
- name: Log in to Quay.io
uses: redhat-actions/podman-login@v1
with:
username: clustersecret
password: ${{ secrets.REGISTRY_PASSWORD }}
registry: quay.io/clustersecret

build-push-quay:
name: Build and push manifest
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
install_latest: [ true ]
# install_latest: [ true, false ]

steps:
# Checkout push-to-registry action github repository
- name: Checkout Push to Registry action
uses: actions/checkout@v2

- name: Install latest podman
if: matrix.install_latest
run: |
bash .github/install_latest_podman.sh
- name: Install qemu dependency
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
- name: Build Image
id: build_image
uses: redhat-actions/buildah-build@main
with:
image: ${{ env.IMAGE_NAMESPACE }}
tags: ${{ env.IMAGE_TAGS }}
platforms: linux/arm64/v8
containerfiles: |
./Dockerfile.gh
# Push the image manifest to Quay.io (Image Registry)
- name: Push To Quay
uses: ./
id: push
with:
image: ${{ steps.build_image.outputs.image }}
tags: ${{ steps.build_image.outputs.tags }}
registry: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAMESPACE }}
# username: ${{ secrets.REGISTRY_USER }}
# password: ${{ secrets.REGISTRY_PASSWORD }}

- name: Echo outputs
run: |
echo "${{ toJSON(steps.push.outputs) }}"

0 comments on commit a57560c

Please sign in to comment.