Skip to content

Commit

Permalink
https://github.com/actions/setup-python/issues/401
Browse files Browse the repository at this point in the history
  • Loading branch information
hussein-awala committed Aug 13, 2023
1 parent 594cae9 commit 93df164
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/actions/breeze/action.yml
Expand Up @@ -31,6 +31,8 @@ runs:
python-version: 3.8
cache: 'pip'
cache-dependency-path: ./dev/breeze/setup*
env:
AGENT_TOOLSDIRECTORY: /opt/hostedtoolache
- name: Cache breeze
uses: actions/cache@v3
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-images.yml
Expand Up @@ -111,6 +111,8 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: 3.8
env:
AGENT_TOOLSDIRECTORY: /opt/hostedtoolache
- name: "Retrieve defaults from branch_defaults.py"
# We cannot "execute" the branch_defaults.py python code here because that would be
# a security problem (we cannot run any code that comes from the sources coming from the PR.
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -387,6 +387,8 @@ jobs:
python-version: "${{needs.build-info.outputs.default-python-version}}"
cache: 'pip'
cache-dependency-path: ./dev/breeze/setup*
env:
AGENT_TOOLSDIRECTORY: /opt/hostedtoolache
- run: python -m pip install --editable ./dev/breeze/
- run: >
breeze setup version ||
Expand Down Expand Up @@ -461,6 +463,8 @@ jobs:
python-version: "${{needs.build-info.outputs.default-python-version}}"
cache: 'pip'
cache-dependency-path: ./dev/requirements.txt
env:
AGENT_TOOLSDIRECTORY: /opt/hostedtoolache
- name: "Test examples of PROD image building"
run: >
cd ./docker_tests &&
Expand Down Expand Up @@ -576,6 +580,8 @@ jobs:
python-version: "${{needs.build-info.outputs.default-python-version}}"
cache: 'pip'
cache-dependency-path: ./dev/breeze/setup*
env:
AGENT_TOOLSDIRECTORY: /opt/hostedtoolache
- name: "Install Breeze"
uses: ./.github/actions/breeze
id: breeze
Expand Down
67 changes: 67 additions & 0 deletions .github/workflows/sync_authors.yml
@@ -0,0 +1,67 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
---
name: Sync authors list

on: # yamllint disable-line rule:truthy
schedule:
# min hr dom mon dow
- cron: '11 01 * * *' # daily at 1.11am
workflow_dispatch:
# only users with write access to apache/airflow can run manually
# https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow

permissions:
contents: write
pull-requests: write

jobs:
sync:
name: Sync
runs-on: [self-hosted, small]

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
env:
AGENT_TOOLSDIRECTORY: /opt/hostedtoolache

- name: Requests
run: |
pip install requests toml
- name: Sync the authors list
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python scripts/ci/runners/sync_authors.py
git config user.name "GitHub Actions"
git config user.email "actions@users.noreply.github.com"
if [ -n "$(git status --porcelain)" ]; then
branch=update-$(date +%s)
git add -A
git checkout -b $branch
git commit --message "Authors list automatic update"
git push origin $branch
gh pr create --title "Authors list automatic update" --body ''
fi

0 comments on commit 93df164

Please sign in to comment.