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

add push to private #92

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
# Run CI including downstream packages on self-hosted runners
downstream-ci:
name: downstream-ci
if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
if: ${{ !contains(github.repository, 'private') && (!github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci') }}
uses: ecmwf-actions/downstream-ci/.github/workflows/downstream-ci.yml@main
with:
anemoi-training: ecmwf/anemoi-training@${{ github.event.pull_request.head.sha || github.sha }}
Expand All @@ -45,7 +45,7 @@ jobs:
# Build downstream packages on HPC
downstream-ci-hpc:
name: downstream-ci-hpc
if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
if: ${{ !contains(github.repository, 'private') && (!github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci') }}
uses: ecmwf-actions/downstream-ci/.github/workflows/downstream-ci-hpc.yml@main
with:
anemoi-training: ecmwf/anemoi-training@${{ github.event.pull_request.head.sha || github.sha }}
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/push-to-private.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Push to private repository

on:
push:
branches:
- develop

jobs:
push_changes:
if: ${{ !contains(github.repository, 'private') }}
runs-on: ubuntu-latest

steps:
- name: Checkout source repository
uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-tags: true

- name: Set up Git configuration
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

- name: Setup SSH key
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.KEY_TO_PRIVATE }}

- name: Push changes to private repository
run: |
git remote add private [email protected]:${{ github.repository }}-private.git
git push --set-upstream private develop
3 changes: 3 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,17 @@ on:

jobs:
quality:
if: ${{ !contains(github.repository, 'private') }}
uses: ecmwf-actions/reusable-workflows/.github/workflows/qa-precommit-run.yml@v2
with:
skip-hooks: "no-commit-to-branch"

checks:
if: ${{ !contains(github.repository, 'private') }}
uses: ecmwf-actions/reusable-workflows/.github/workflows/qa-pytest-pyproject.yml@v2

deploy:
if: ${{ !contains(github.repository, 'private') }}
needs: [checks, quality]
uses: ecmwf-actions/reusable-workflows/.github/workflows/cd-pypi.yml@v2
secrets: inherit
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Keep it human-readable, your future self will thank you!
- Add anemoi-transform link to documentation
- Codeowners file (#56)
- Changelog merge strategy (#56)
- Add synchronisation workflow

#### Miscellaneous

Expand Down
Loading