Skip to content

Commit

Permalink
wip - new ci 2
Browse files Browse the repository at this point in the history
  • Loading branch information
itewk committed Oct 18, 2024
1 parent b2e6581 commit 25f415f
Showing 1 changed file with 46 additions and 8 deletions.
54 changes: 46 additions & 8 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ env:
GITHUB_EVENT_NUMBER: ${{ github.event.number }}
REGISTRY_URI: ${{ vars.REGISTRY_URI }}
REGISTRY_REPOSITORY: ${{ vars.REGISTRY_REPOSITORY }}
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
IMAGE_NAME: ee-kustomzie-with-ocm-policygenerator-plugin-and-helm

jobs:
Expand All @@ -37,7 +39,12 @@ jobs:

steps:
- name: Checkout πŸ›ŽοΈ
uses: actions/[email protected]
uses: actions/checkout@v4

- name: Prepare
run: |
platform=${{ matrix.platform }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
- name: Docker meta βš™οΈ
id: meta
Expand All @@ -56,24 +63,55 @@ jobs:
- name: Image Tags 🏷
run: echo "${{ steps.meta.outputs.tags }}"

- name: Image Labels
- name: Image Labels 🏷
run: echo "${{ steps.meta.outputs.labels }}"

- name: Install ansible-builder 🧰
run: pip install ansible-builder

- name: Crate Ansible EE container image context πŸ› 
run: ansible-builder create -v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Build Ansible EE container images πŸ› 
uses: redhat-actions/buildah-build@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY_URI }}
username: ${{ env.REGISTRY_USERNAME }}
password: ${{ env.REGISTRY_PASSWORD }}

- name: Build and push by digest
id: build-push
uses: docker/build-push-action@v6
with:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
context: ./context
containerfiles: |
./context/Containerfile
file: ./context/Containerfile
platforms: ${{ matrix.platform }}
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
push: true
load: false

- name: Pushed Image Digest πŸ”–
run: echo ${{ steps.build-push.outputs.digest }}

- name: Pushed Image Registry Paths πŸ”–
run: echo ${{ steps.build-push.outputs.imageid }}

# - name: Build Ansible EE container images πŸ› 
# uses: redhat-actions/buildah-build@v2
# with:
# tags: ${{ steps.meta.outputs.tags }}
# labels: ${{ steps.meta.outputs.labels }}
# context: ./context
# containerfiles: |
# ./context/Containerfile
# platforms: ${{ matrix.platform }}



Expand Down

0 comments on commit 25f415f

Please sign in to comment.