Skip to content

Commit

Permalink
Merge pull request #683 from gerrod3/correct-action-3.28
Browse files Browse the repository at this point in the history
Update actions to latest version and set CI python to 3.11 [3.28]
  • Loading branch information
gerrod3 authored Oct 16, 2024
2 parents 8bb8489 + b7fa464 commit 33b2fb8
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 162 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/docs.yml

This file was deleted.

97 changes: 0 additions & 97 deletions .github/workflows/kanban.yml

This file was deleted.

62 changes: 18 additions & 44 deletions .github/workflows/pulp_images.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
name: pulp-oci-images CI

on:
push:
branches:
- latest
schedule:
- cron: '0 1 * * *'
workflow_dispatch:
pull_request:
env:
Expand All @@ -17,14 +12,16 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# by default, it uses a depth of 1
# this fetches all history so that we can read each commit
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.11

- name: Check commit message
if: github.event_name == 'pull_request'
Expand Down Expand Up @@ -56,45 +53,30 @@ jobs:
image_variants: "${{ steps.image_variants.outputs.image_variants }}"
pulp_ci_centos_id: "${{ steps.pulp_ci_centos_id.outputs.pulp_ci_centos_id }}"
steps:
# We do not want to build nightly images unless it's a PR to the latest branch,
# or a branch/dispatch build on the latest branch.
- name: Set the list of image_variants for later jobs
id: image_variants
run: |
if [ "${{ github.base_ref }}" == "latest" ] || [ "${{ github.ref_name }}" == "latest" ]; then
echo "image_variants=[\"nightly\",\"stable\"]" >> "$GITHUB_OUTPUT"
else
echo "image_variants=[\"stable\"]" >> "$GITHUB_OUTPUT"
fi
run: echo "image_variants=[\"stable\"]" >> "$GITHUB_OUTPUT"

- name: Set the temporary image tag
run: |
temp_base_tag="${GITHUB_REF_NAME%/*}"
echo "Building $temp_base_tag"
echo "TEMP_BASE_TAG=${temp_base_tag}" >> $GITHUB_ENV
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# by default, it uses a depth of 1
# this fetches all history so that we can read each commit
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.11

- name: Update to the latest pip
run: python -m pip install --upgrade pip

- name: Dispatch workflows on stable branches
if: github.event_name == 'schedule'
run: |
echo ::group::PYDEPS
pip install gitpython requests packaging jinja2 pyyaml
echo ::endgroup::
python .ci/scripts/update_ci_branches.py
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}

- name: Build images
run: |
podman version
Expand All @@ -119,7 +101,7 @@ jobs:
echo "pulp_ci_centos_id=${id}" >> "$GITHUB_ENV"
- name: Cache podman images
uses: actions/cache/save@v3
uses: actions/cache/save@v4
with:
key: base-images=${{ env.pulp_ci_centos_id }}
path: base-images.tar
Expand Down Expand Up @@ -158,14 +140,16 @@ jobs:
echo "TEMP_APP_TAG=${temp_app_tag}" >> $GITHUB_ENV
echo "TEMP_BASE_TAG=${temp_base_tag}" >> $GITHUB_ENV
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# by default, it uses a depth of 1
# this fetches all history so that we can read each commit
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.11

- name: Install python dependencies
if: github.event_name == 'schedule'
Expand All @@ -181,7 +165,7 @@ jobs:
fi
- name: Restore podman images from cache
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
key: base-images=${{ needs.base-images.outputs.pulp_ci_centos_id }}
path: base-images.tar
Expand Down Expand Up @@ -253,20 +237,10 @@ jobs:
podman rm pulp
- name: Compose up
if: matrix.app.image_name == 'galaxy-minimal' || matrix.app.image_name == 'pulp-minimal'
run: |
if [[ "${{ matrix.app.image_name }}" == "pulp" || "${{ matrix.app.image_name }}" == "galaxy" ]]; then
# Reuse the folders from the s6 mode tests
FILE="docker-compose.folders.yml"
# We'll pull the web image from a registry since we didn't build it.
if [ "${{ matrix.image_variant }}" == "nightly" ]; then
WEB_TAG="nightly"
else
WEB_TAG="${APP_BRANCH}"
fi
else
FILE="docker-compose.yml"
WEB_TAG="${TEMP_APP_TAG}"
fi
FILE="docker-compose.yml"
WEB_TAG="${TEMP_APP_TAG}"
cd images/compose
sed -i "s/pulp-minimal:latest/${{ matrix.app.image_name }}:${TEMP_APP_TAG}/g" $FILE
sed -i "s/pulp-web:latest/${{ matrix.app.web_image }}:${WEB_TAG}/g" $FILE
Expand Down
4 changes: 2 additions & 2 deletions images/galaxy-minimal/stable/Containerfile.core
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARG FROM_TAG="latest"
FROM pulp/base:${FROM_TAG}

ARG PULPCORE_VERSION=""
ARG GALAXY_NG_VERSION=""
ARG PULPCORE_VERSION="~=3.28.21"
ARG GALAXY_NG_VERSION="~=4.9.0"

RUN pip3 install --upgrade \
galaxy-ng${GALAXY_NG_VERSION} \
Expand Down
4 changes: 2 additions & 2 deletions images/galaxy/stable/Containerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARG FROM_TAG="latest"
FROM pulp/pulp-ci-centos:${FROM_TAG}

ARG PULPCORE_VERSION=""
ARG GALAXY_NG_VERSION=""
ARG PULPCORE_VERSION="~=3.28.21"
ARG GALAXY_NG_VERSION="~=4.9.0"

RUN pip3 install --upgrade \
galaxy-ng${GALAXY_NG_VERSION} \
Expand Down

0 comments on commit 33b2fb8

Please sign in to comment.