Skip to content

Commit

Permalink
Add workflows for complex images (nginx)
Browse files Browse the repository at this point in the history
  • Loading branch information
dometto committed Nov 13, 2024
1 parent 42c0496 commit e600dbb
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 1 deletion.
55 changes: 55 additions & 0 deletions .github/workflows/build_and_deploy_misc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
# This workflow is to build images that themselves are based on the base images.
# Accordingly, it should be run after the build of the base images.
name: Build and Deploy complex images
on:
schedule:
- cron: '22 1 * * 1' # 22 past 01:00 on Monday
worklow_dispatch:
push:
branches:
- main
paths:
- 'ubuntu/**'
- 'pack.sh'
- 'base/ubuntu/**'

jobs:
build_and_deploy:
runs-on: ubuntu-latest
env:
ANSIBLE_VERSION: 2.15.5
strategy:
fail-fast: false
matrix:
update_base_components:
- true
- false
images:
- ubuntu/jammy-nginx
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install specific ansible-core version
run: pip install ansible-core==${{ env.ANSIBLE_VERSION }}
- name: Debug ansible version
run: ansible-playbook --version
- name: Install ansible dependencies
run: ansible-galaxy collection install -r requirements.yml
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build image
id: build-image
run: BUILD_BASE_IMG=false IMG=${{ matrix.images }} UPDATE_BASE_COMPONENTS=${{ matrix.update_base_components }} ./pack.sh docker
- name: Get image name and tag # grep in the image directory's variables file to find the image name/tag to push to
id: get-image-name
run: |
echo "container_repo=`grep container_repo ${{ matrix.images }}/variables.auto.pkrvars.hcl | awk '{print $3}'`" >> "$GITHUB_OUTPUT"
- name: Push image
run: docker push ${{ steps.get-image-name.outputs.container_repo }}${{ matrix.update_base_components && '-pilot' || '' }}
2 changes: 1 addition & 1 deletion .github/workflows/prune.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ jobs:
env:
OWNER: orgs/UtrechtUniversity
PACKAGE_NAME: SRC-test-workspace
KEEP_MIN: 8
KEEP_MIN: 10
PER_PAGE: 100

0 comments on commit e600dbb

Please sign in to comment.