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 43bdc46
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 14 deletions.
34 changes: 20 additions & 14 deletions .github/workflows/upload_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,50 @@ 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:
- run: python -m pip install --upgrade idf-component-manager
- uses: actions/checkout@v3
with:
submodules: "recursive"
- run: ls -lrt
- run: echo $(pwd)
- run: cp -r common host/
- run: cp -r common slave/
- run: mv host esp_host
- run: mv slave esp_slave

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

- run: ls -lrt
- run: cd esp_host
- run: ls -lrt
- run: python -m pip install --upgrade idf-component-manager
- name: Upload host component to the component registry
uses: espressif/upload-components-ci-action@v1
with:
directories: "host"
name: "esp_hosted_host"
directories: "./"
name: "esp_host"
namespace: "mantriyogesh"
api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }}
needs: [create_components]

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

- run: ls -lrt
- run: cd esp_slave
- run: ls -lrt
- run: python -m pip install --upgrade idf-component-manager
- name: Upload slave component to the component registry
uses: espressif/upload-components-ci-action@v1
with:
directories: "slave"
name: "esp_hosted_slave"
directories: "./"
name: "esp_slave"
namespace: "mantriyogesh"
api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }}
needs: [create_components]
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 43bdc46

Please sign in to comment.