-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
51 additions
and
30 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,9 +8,10 @@ on: | |
branches: | ||
- main | ||
tags: | ||
- 'v*.*.*' | ||
- 'v*' | ||
pull_request: | ||
branches: [ main ] | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
|
@@ -22,49 +23,69 @@ env: | |
GITHUB_EVENT_NUMBER: ${{ github.event.number }} | ||
REGISTRY_URI: ${{ vars.REGISTRY_URI }} | ||
REGISTRY_REPOSITORY: ${{ vars.REGISTRY_REPOSITORY }} | ||
IMAGE_NAME: ee-kustomzie-with-ocm-policygenerator-plugin-and-helm | ||
|
||
jobs: | ||
build-and-publish-ee: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
IMAGE_NAME: ee-kustomzie-with-ocm-policygenerator-plugin-and-helm | ||
|
||
outputs: | ||
version: ${{ steps.prep.outputs.version }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: | ||
- linux/amd64 | ||
- linux/arm64 | ||
|
||
steps: | ||
- name: Checkout ποΈ | ||
uses: actions/[email protected] | ||
|
||
- name: Determine Image Version and Tags βοΈ | ||
id: prep | ||
run: ${GITHUB_WORKSPACE}/.github/scripts/determine-image-version.sh | ||
|
||
- name: Version π | ||
run: echo ${{ steps.prep.outputs.version }} | ||
- 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}} | ||
- name: Image Tags π· | ||
run: echo ${{ steps.prep.outputs.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: Build Ansible EE container image π | ||
run: | | ||
ansible-builder build -v3 \ | ||
--tag ${{ steps.prep.outputs.tags }} | ||
- name: Publish images πΊ | ||
id: publish-images | ||
uses: redhat-actions/[email protected] | ||
- name: Crate Ansible EE container image context π | ||
run: ansible-builder create -v3 | ||
|
||
- name: Build Ansible EE container images π | ||
uses: redhat-actions/buildah-build@v2 | ||
with: | ||
tags: ${{ steps.prep.outputs.tags }} | ||
username: ${{ secrets.REGISTRY_USERNAME }} | ||
password: ${{ secrets.REGISTRY_PASSWORD }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
context: ./context | ||
containerfiles: | | ||
./context/Containerfile | ||
platforms: ${{ matrix.platform }} | ||
|
||
|
||
|
||
# - name: Publish images πΊ | ||
# id: publish-images | ||
# uses: redhat-actions/push-to-registry@v2 | ||
# with: | ||
# tags: ${{ steps.prep.outputs.tags }} | ||
# username: ${{ secrets.REGISTRY_USERNAME }} | ||
# password: ${{ secrets.REGISTRY_PASSWORD }} | ||
|
||
- name: Pushed Image Digest π | ||
run: echo ${{ steps.publish-images.outputs.digest }} | ||
# - name: Pushed Image Digest π | ||
# run: echo ${{ steps.publish-images.outputs.digest }} | ||
|
||
- name: Pushed Image Registry Paths π | ||
run: echo ${{ steps.publish-images.outputs.registry-paths }} | ||
# - name: Pushed Image Registry Paths π | ||
# run: echo ${{ steps.publish-images.outputs.registry-paths }} |