Skip to content

Commit

Permalink
Restructure README to improve consistency and flow.
Browse files Browse the repository at this point in the history
  • Loading branch information
wmcdonald404 committed Jul 30, 2023
1 parent 5d49f53 commit 65ac328
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ee-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ jobs:
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ${CONTAINER_REGISTRY_URL} -u $ --password-stdin

- name: Install ansible-builder python requirements
- name: Install ansible-builder Python requirements
run: |
mkdir -p ${GITHUB_WORKSPACE}/ee
python3 -m venv ${GITHUB_WORKSPACE}/ee
. ${GITHUB_WORKSPACE}/ee/bin/activate
python3 -m pip install --upgrade pip
pip install ansible-builder
- name: Prepare baseline execution environment config
- name: Prepare Baseline Execution Environment config
run: |
cat > ${GITHUB_WORKSPACE}/${EE_BASELINE_IMAGE_NAME}.yml <<EOF
version: 3
Expand All @@ -39,11 +39,11 @@ jobs:
package_pip: ansible-runner
EOF
- name: Build baseline execution environment image
- name: Build Baseline Execution Environment image
run: |
ansible-builder build -f ${GITHUB_WORKSPACE}/${EE_BASELINE_IMAGE_NAME}.yml -t ${EE_BASELINE_IMAGE_NAME} -v3 --container-runtime docker
- name: Push baseline execution environment image
- name: Push Baseline Execution Environment image
run: |
IMAGE_ID=ghcr.io/${GITHUB_REPOSITORY_OWNER}/${EE_BASELINE_IMAGE_NAME}
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
Expand All @@ -55,7 +55,7 @@ jobs:
docker tag $EE_BASELINE_IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
- name: Prepare Azure execution environment config
- name: Prepare Azure Execution Environment config
run: |
cat > ${GITHUB_WORKSPACE}/${EE_AZURE_IMAGE_NAME}.yml <<EOF
version: 3
Expand All @@ -79,7 +79,7 @@ jobs:
RUN dnf -y install azure-cli
EOF
- name: Build azure execution environment image
- name: Build Azure Execution Environment image
run: |
ansible-builder build -f ${GITHUB_WORKSPACE}/${EE_AZURE_IMAGE_NAME}.yml -t ${EE_AZURE_IMAGE_NAME} -v3 --container-runtime docker
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,22 +125,22 @@ Note that only ansible.builtin core modules are currently installed. The executi
At this stage, we can push the build container image to a registry, or build on top of it with additional collections to create purpose-specific execution environments (Azure, AWS, or GCP specific EEs, for example.)

## Github Action Execution Environments Preparation & Build
Now we understand the manual process, we can wrap this into a Github Actions workflow. [The workflow](https://github.com/wmcdonald404/ee-sandbox/blob/main/.github/workflows/ee-build.yml) currently runs a job 'ee-build' which can be broken down into:
Now we understand the manual process, we can wrap this into a Github Actions workflow. [The workflow](https://github.com/wmcdonald404/ee-sandbox/blob/main/.github/workflows/ee-build.yml) currently runs a job `ee-build` which can be broken down into:
### Github Action Common Preamble & Prerequisites
- name: Log in to registry
- name: Install ansible-builder python requirements
- name: Install ansible-builder Python requirements

See: https://github.com/wmcdonald404/ee-sandbox/blob/main/.github/workflows/ee-build.yml#L18-L24
See: https://github.com/wmcdonald404/ee-sandbox/blob/main/.github/workflows/ee-build.yml#L15-L24
### Github Action Baseline EE Prep, Build, Push
- name: Prepare baseline execution environment config
- name: Build baseline execution environment image
- name: Push baseline execution environment image
- name: Prepare Baseline Execution Environment config
- name: Build Baseline Execution Environment image
- name: Push Baseline Execution Environment image

See: https://github.com/wmcdonald404/ee-sandbox/blob/main/.github/workflows/ee-build.yml#L26-L56
### Github Action Azure EE Prep, Build, Push
- name: Prepare Azure execution environment config
- name: Build azure execution environment image
- name: Push Azure execution environment image
- name: Prepare Azure Execution Environment config
- name: Build Azure Execution Environment image
- name: Push Azure Execution Environment image

See: https://github.com/wmcdonald404/ee-sandbox/blob/main/.github/workflows/ee-build.yml#L26-L56
## Azure OIDC Preparation for Github Actions
Expand Down

0 comments on commit 65ac328

Please sign in to comment.