Skip to content

Commit

Permalink
Merge pull request #60 from ecmwf/feature/synch-repos
Browse files Browse the repository at this point in the history
Add workflow to sync repos
  • Loading branch information
b8raoult authored Oct 16, 2024
2 parents dcc994d + a8d1937 commit 224b40f
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 2 deletions.
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-models: ecmwf/anemoi-models@${{ 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-models: ecmwf/anemoi-models@${{ 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
2 changes: 2 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ 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') }}
strategy:
matrix:
python-version: ["3.9", "3.10", "3.x"]
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Keep it human-readable, your future self will thank you!

## [Unreleased](https://github.com/ecmwf/anemoi-models/compare/0.3.0...HEAD)

- Add synchronisation workflow

### Added

- Add anemoi-transform link to documentation
Expand Down

0 comments on commit 224b40f

Please sign in to comment.