| 1 |
--- |
| 2 |
name: Container Image |
| 3 |
|
| 4 |
on: |
| 5 |
schedule: |
| 6 |
- cron: 0 0 * * 6 |
| 7 |
|
| 8 |
jobs: |
| 9 |
build-and-push-image: |
| 10 |
name: Build and Push Development Container |
| 11 |
if: github.repository_owner == 'freeipa' |
| 12 |
runs-on: ubuntu-latest |
| 13 |
steps: |
| 14 |
- name: Checkout repository |
| 15 |
uses: actions/checkout@v5 |
| 16 |
with: |
| 17 |
fetch-depth: 1 |
| 18 |
|
| 19 |
- uses: actions/[email protected] |
| 20 |
with: |
| 21 |
python-version: "3.x" |
| 22 |
|
| 23 |
- name: Install dependencies |
| 24 |
run: | |
| 25 |
pip install 'ansible-core<2.19' |
| 26 |
ansible-galaxy collection install -r developer/requirements.yml |
| 27 |
|
| 28 |
- name: Build container and deploy IPA |
| 29 |
run: developer/dev-env.sh -B webui-dev |
| 30 |
|
| 31 |
- name: Tag images |
| 32 |
run: | |
| 33 |
podman tag webui-dev:base quay.io/ansible-freeipa/webui-dev:base |
| 34 |
podman tag webui-dev:latest quay.io/ansible-freeipa/webui-dev:latest |
| 35 |
|
| 36 |
- name: Login to Container Registry |
| 37 |
# Pin to v3.5.0 SHA |
| 38 |
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 |
| 39 |
with: |
| 40 |
registry: quay.io |
| 41 |
username: ${{ vars.QUAY_USERNAME }} |
| 42 |
password: ${{ secrets.QUAY_ROBOT_TOKEN }} |
| 43 |
|
| 44 |
- name: Push images |
| 45 |
run: | |
| 46 |
podman push quay.io/ansible-freeipa/webui-dev:base |
| 47 |
podman push quay.io/ansible-freeipa/webui-dev:latest |