Workflow file for this run
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: Build Ansible Execution Environment Image | |
on: | |
workflow_run: | |
workflows: ["Build Ansible Collection","Publish Ansible Collection"] | |
types: | |
- completed | |
push: | |
branches: | |
- '**' | |
tags-ignore: | |
- '**' | |
jobs: | |
ansible-ee-build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
# Without this option, we don't get the tag information | |
with: | |
fetch-depth: 0 | |
- name: Initialise the build system | |
run: | | |
chmod u+x $GITHUB_WORKSPACE/build/bin/*.sh | |
$GITHUB_WORKSPACE/build/bin/initbuild.sh | |
source $GITHUB_WORKSPACE/build/bin/.functions.sh | |
- name: Build the Ansible execution environment | |
uses: mikefarah/[email protected] | |
with: | |
run: | | |
chmod u+x $GITHUB_WORKSPACE/build/bin/*.sh | |
$GITHUB_WORKSPACE/build/bin/build-execution-environment.sh | |
- name: Push the container image | |
id: docker-push | |
run: | | |
docker tag ibmmas/ansible-devops-ee quay.io/ibmmas/ansible-devops-ee:${{ env.DOCKER_TAG }} | |
docker images | |
docker login --username "${{ secrets.QUAYIO_USERNAME }}" --password "${{ secrets.QUAYIO_PASSWORD }}" quay.io | |
docker push quay.io/ibmmas/ansible-devops-ee:${{ env.DOCKER_TAG }} | |
- name: Push the container image (master) | |
id: docker-push-master | |
if: github.ref == 'refs/heads/master' | |
run: | | |
docker tag ibmmas/ansible-devops-ee quay.io/ibmmas/ansible-devops-ee:master | |
docker images | |
docker push quay.io/ibmmas/ansible-devops-ee:master | |
- name: Push the container image (latest) | |
id: docker-push-latest | |
if: github.event_name == 'release' | |
run: | | |
docker tag ibmmas/ansible-devops-ee quay.io/ibmmas/ansible-devops-ee:latest | |
docker images | |
docker push quay.io/ibmmas/ansible-devops-ee:latest | |
--enableRetired | |