Skip to content

Commit

Permalink
Update .gitlab-ci.yml file
Browse files Browse the repository at this point in the history
  • Loading branch information
mantriyogesh committed Jan 26, 2024
1 parent 6dc11ba commit ecb89b2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 9 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/upload_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,24 @@ name: Push component to https://components.espressif.com
on:
push:
branches:
- feature/esp_as_mcu_host
- feature/ext_component_host

jobs:
create_components:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"
- run: python -m pip install --upgrade idf-component-manager
- run: ls -lrt
- run: echo $(pwd)
- run: cp -r common host/
- run: cp -r common slave/

upload_component_host:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"

- name: Upload host component to the component registry
uses: espressif/upload-components-ci-action@v1
with:
Expand All @@ -31,10 +32,6 @@ jobs:
upload_component_slave:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"

- name: Upload slave component to the component registry
uses: espressif/upload-components-ci-action@v1
with:
Expand Down
18 changes: 18 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,22 @@ deploy_esp32p4_github:
# - cd ../slave
# - compote component upload --allow-existing --name esp_hosted_slave --namespace mantriyogesh --project-dir ./

deploy_ext_component_github:
stage: deploy
image: $CI_DOCKER_REGISTRY/esp32-ci-env
tags:
- deploy
when: manual
only:
- feature/ext_component_host
script:
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo -n $GH_KEY > ~/.ssh/id_rsa_base64
- base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- git remote remove github &>/dev/null || true
- git remote add github [email protected]:espressif/esp-hosted.git
- git push -f github "${CI_COMMIT_SHA}:refs/heads/${CI_COMMIT_REF_NAME}"

0 comments on commit ecb89b2

Please sign in to comment.