ci - init #18
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
--- | |
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 }} | |
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 }} | |
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: Image Tags π· | |
run: echo ${{ steps.prep.outputs.tags }} | |
- 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] | |
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 Registry Paths π | |
run: echo ${{ steps.publish-images.outputs.registry-paths }} |