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

ci: fix deprecation of set-output and use ubuntu 22.04 and py311 #3068

Merged
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 8 additions & 13 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
# ref: https://hub.docker.com/orgs/jupyterhub

publish:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -44,34 +44,29 @@ jobs:

- uses: actions/setup-python@v4
with:
python-version: "3.8"
python-version: "3.11"

- name: store whether we are publishing the chart
- name: Decide to publish or not
id: publishing
shell: python
env:
REPO: ${{ github.repository }}
EVENT: ${{ github.event_name }}
REF: ${{ github.event.ref }}
run: |
import os
repo = os.environ["REPO"]
event = os.environ["EVENT"]
ref = os.environ["REF"]
repo = "${{ github.repository }}"
event = "${{ github.event_name }}"
ref = "${{ github.event.ref }}"
Comment on lines +54 to +56
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Provides a bit more readability when inspecting this, and now that we write to a file based on GITHUB_OUTPUT, this is no longer fine to copy paste this script to run locally anyhow when it previously could be fine to run it locally after having set a few env vars.

publishing = ""
if (
repo == "jupyterhub/zero-to-jupyterhub-k8s"
and event == "push"
and (
# any tag
ref.startswith("refs/tags/")
# or default branch
or ref == "refs/heads/main"
)
):
publishing = "true"
print("Publishing chart")
print(f"::set-output name=publishing::{publishing}")
with open(os.environ["GITHUB_OUTPUT"], "a") as f:
f.write(f"publishing={publishing}\n")

- name: Set up QEMU (for docker buildx)
uses: docker/setup-qemu-action@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
create-release:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/support-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions:

jobs:
action:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: dessant/support-requests@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-docker-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
# - https://github.com/docker/build-push-action/blob/v2.3.0/docs/advanced/local-registry.md
# - https://github.com/docker/build-push-action/blob/v2.3.0/docs/advanced/multi-platform.md
build_images:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:

jobs:
linkcheck:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vuln-scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ on:
jobs:
trivy_image_scan:
if: github.repository == 'jupyterhub/zero-to-jupyterhub-k8s'
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
environment: watch-dependencies

strategy:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/watch-dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
update-image-dependencies:
# Don't run this job on forks
if: github.repository == 'jupyterhub/zero-to-jupyterhub-k8s'
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
environment: watch-dependencies

strategy:
Expand Down Expand Up @@ -202,7 +202,7 @@ jobs:
# these dependencies every day is too much noise.
#
if: github.repository == 'jupyterhub/zero-to-jupyterhub-k8s' && github.event_name != 'schedule'
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
environment: watch-dependencies

steps:
Expand Down