Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into fix_gha_and_and
Browse files Browse the repository at this point in the history
  • Loading branch information
cidrblock authored May 13, 2024
2 parents 08b3d40 + 39439cd commit 5215e36
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 25 deletions.
24 changes: 14 additions & 10 deletions .github/actions/build-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ inputs:
default: ansible
final_image:
description: Name of the final image.
default: community-ansible-devspaces
default: ansible-workspace-env-reference
publish:
description: Publish the image to ghcr.io
default: "false"
Expand Down Expand Up @@ -46,6 +46,18 @@ runs:
${{ inputs.namespace }}/${{ inputs.final_image }}:test
# cache-from: type=gha,scope=build-${{ env.PLATFORM_PAIR }}
# cache-to: type=gha,scope=build-${{ env.PLATFORM_PAIR }}

- name: Docker meta
id: meta
if: ${{ inputs.publish == 'true' }}
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ inputs.namespace }}/${{ inputs.final_image }}
flavor: |
latest=false
tags: |
type=raw,value=latest
type=ref,event=tag
- name: Push the built image to ghcr.io
id: push-final
Expand All @@ -55,13 +67,5 @@ runs:
context: ${{ github.workspace }}/context
provenance: false
file: ${{ github.workspace }}/Containerfile
tags: |
ghcr.io/${{ inputs.namespace }}/${{ inputs.final_image }}:latest
tags: ${{ steps.meta.outputs.tags }}
push: true

# this step is ONLY needed for maintainence of self hosted runners
- name: Cleanup docker
shell: bash
if: always()
run: |
docker system prune -af --volumes
9 changes: 3 additions & 6 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@ concurrency:
cancel-in-progress: true

on:
push:
tags:
- '*'
schedule:
- cron: '0 0 * * *'
release:
types: [published]
workflow_dispatch:

jobs:
Expand All @@ -26,6 +23,6 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build the container image
uses: ansible/community-ansible-devspaces-image/.github/actions/build-release@main
uses: ansible/ansible-workspace-env-reference-image/.github/actions/build-release@main
with:
publish: 'true'
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build the container image
uses: ansible/community-ansible-devspaces-image/.github/actions/build-release@main
uses: ansible/ansible-workspace-env-reference-image/.github/actions/build-release@main
2 changes: 1 addition & 1 deletion Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM quay.io/devfile/universal-developer-image:ubi8-latest

ARG PYV=3.11

LABEL org.opencontainers.image.source https://github.com/ansible/community-ansible-devspaces-image
LABEL org.opencontainers.image.source https://github.com/ansible/ansible-workspace-env-reference-image
LABEL org.opencontainers.image.authors "Ansible DevTools"
LABEL org.opencontainers.image.vendor "Red Hat"
LABEL org.opencontainers.image.licenses "GPL-3.0"
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
[![cd](https://github.com/ansible/community-ansible-devspaces-image/actions/workflows/cd.yml/badge.svg?branch=main&event=schedule)](https://github.com/ansible/community-ansible-devspaces-image/actions/workflows/cd.yml)

# Community Ansible Dev Spaces Image
# Ansible Workspace Environment Reference Image for Openshift Devspaces

An OpenShift Dev Spaces image specifically for Ansible development.

Expand All @@ -10,7 +8,7 @@ For documentation on how to use these tools, please refer to [ADT docs](https://
This image is built and published on a nightly basis. Grab this image using:

```bash
podman pull ghcr.io/ansible/community-ansible-devspaces:latest
podman pull ghcr.io/ansible/ansible-workspace-env-reference:latest
```

## Base Image
Expand Down
6 changes: 3 additions & 3 deletions playbooks/ansible-navigator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
ansible-navigator:
logging:
level: debug
append: False
append: false
file: $PWD/.logs/ansible-navigator.log

execution-environment:
enabled: true
image: ghcr.io/ansible/community-ansible-dev-tools-container:latest
image: ghcr.io/ansible/community-ansible-dev-tools:latest
pull:
policy: always

playbook-artifact:
enable: True
enable: true
save-as: "$PWD/.logs/{playbook_name}-artifact-{time_stamp}.json"

0 comments on commit 5215e36

Please sign in to comment.