Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GHA to build and push operator and runner images on merge #154

Merged
merged 3 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/build-operator-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---

name: Build Operator Image

on:
push:
branches: [devel]

jobs:
operator-image-build:
runs-on: ubuntu-latest
name: Push Operator Image
steps:
- uses: actions/checkout@v2

- name: Build Image
run: |
IMG=awx-resource-operator:devel make docker-build

- name: Push To Quay
uses: redhat-actions/push-to-registry@v2.1.1
with:
image: awx-resource-operator
tags: devel
registry: quay.io/ansible/
username: ${{ secrets.QUAY_USER }}
password: ${{ secrets.QUAY_TOKEN }}
runner-image-build:
runs-on: ubuntu-latest
name: Push Runner Image
steps:
- uses: actions/checkout@v2

- name: Build Image
run: |
docker build -t awx-resource-runner:devel -f Dockerfile.runner .

- name: Push To Quay
uses: redhat-actions/push-to-registry@v2.1.1
with:
image: awx-resource-runner
tags: devel
registry: quay.io/ansible/
username: ${{ secrets.QUAY_USER }}
password: ${{ secrets.QUAY_TOKEN }}
2 changes: 1 addition & 1 deletion Dockerfile.runner
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ COPY requirements.yml ${HOME}/requirements.yml
RUN ansible-galaxy collection install -r ${HOME}/requirements.yml --force \
&& chmod -R ug+rwx ${HOME}/.ansible && mkdir -p ${HOME}/roles

RUN pip3 install ansible-tower-cli kubernetes openshift
RUN pip3 install awxkit kubernetes openshift

COPY roles/job_runner ${HOME}/roles/job_runner
CMD ["ansible-runner", "run", "/runner", "--hosts", "localhost", "--role", "job_runner", "--role-skip-facts"]
Loading