Skip to content

wip - bla

wip - bla #36

Workflow file for this run

---
name: publish
on:
schedule:
- cron: '0 10 * * *' # everyday at 10am
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
GITHUB_EVENT_REPOSITORY_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
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:
build-and-publish-ee:
runs-on: ubuntu-latest
strategy:
fail-fast: false
#matrix:
# platform:
# - linux/amd64
# - linux/arm64
steps:
- name: Checkout πŸ›ŽοΈ
uses: actions/checkout@v4
#- name: Prepare
# run: |
# platform=${{ matrix.platform }}
# echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
- name: Docker meta βš™οΈ
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_URI }}/${{ env.REGISTRY_REPOSITORY }}/${{ env.IMAGE_NAME }}
tags: |
type=schedule,pattern=nightly
type=edge,branch=main
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Image Tags 🏷
run: echo "${{ steps.meta.outputs.tags }}"
- 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
with:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
context: ./context
containerfiles: |
./context/Containerfile
platforms: linux/amd64,linux/arm64
#platforms: ${{ matrix.platform }}
# - name: Set up Docker Buildx 🧰
# uses: docker/setup-buildx-action@v3
# - name: Login to Container Registry πŸ”‘
# 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:
# context: ./context
# 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: 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 }}
- name: Publish images πŸ”Ί
id: publish-images
uses: redhat-actions/push-to-registry@v2
with:
tags: ${{ steps.meta.outputs.tags }}
username: ${{ env.REGISTRY_USERNAME }}
password: ${{ env.REGISTRY_PASSWORD }}
- name: Pushed Image Digest πŸ”–
run: echo ${{ steps.publish-images.outputs.digest }}
- name: Pushed Image Registry Paths πŸ”–
run: echo ${{ steps.publish-images.outputs.registry-paths }}