From 94847987c63f48f78683c4ba1f3a4e473865b389 Mon Sep 17 00:00:00 2001 From: Nicolas Girardot Date: Wed, 19 Feb 2025 09:52:49 +0100 Subject: [PATCH 1/9] feat: add build option --- .github/workflows/build.yml | 20 +++++++++++++++++ .github/workflows/{test.yml => install.yml} | 2 +- action.yml | 25 ++++++++++++++++++++- 3 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/build.yml rename .github/workflows/{test.yml => install.yml} (95%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..0bddf5a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,20 @@ +name: "Test Setup Edgee Action" + +on: + push: + branches: + - main + pull_request: + +jobs: + test-build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Test Setup Edgee Action + uses: ./ + with: + build: "true" diff --git a/.github/workflows/test.yml b/.github/workflows/install.yml similarity index 95% rename from .github/workflows/test.yml rename to .github/workflows/install.yml index d864b00..433e7a1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/install.yml @@ -7,7 +7,7 @@ on: pull_request: jobs: - test-action: + test-install: runs-on: ubuntu-latest steps: diff --git a/action.yml b/action.yml index 33f5ade..fd09bd9 100644 --- a/action.yml +++ b/action.yml @@ -2,14 +2,37 @@ name: "Install Edgee's CLI" description: "Install edgee from www.github.com/edgee-cloud/edgee" author: "edgee-cloud" +inputs: + build: + description: "Build Edgee from source instead of download" + required: false + default: "false" + runs: using: "composite" steps: + - name: Install dependencies + if: inputs.build == 'true' + run: | + sudo apt-get update + shell: bash + + - name: Clone and Build Edgee + if: inputs.build == 'true' + run: | + git clone https://github.com/edgee-cloud/edgee.git + cd edgee + make + mv edgee /usr/local/bin/ + echo "Edgee built and added to path" + shell: bash + - name: Install Edgee + if: inputs.build == 'false' run: | curl https://install.edgee.cloud | sh mv edgee /usr/local/bin/ - echo "added edgee to path" + echo "Edgee downloaded and added to path" shell: bash - name: Verify Edgee installation From 5d8a277d25fda49fdd3028c39958ecb58261a8f3 Mon Sep 17 00:00:00 2001 From: Nicolas Girardot Date: Wed, 19 Feb 2025 09:56:40 +0100 Subject: [PATCH 2/9] feat: add setup --- .github/workflows/install.yml | 2 -- action.yml | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 433e7a1..10e593f 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -16,8 +16,6 @@ jobs: - name: Test Setup Edgee Action uses: ./ - with: - branch: "main" - name: Verify Edgee Installation run: edgee --version diff --git a/action.yml b/action.yml index fd09bd9..7cb80d3 100644 --- a/action.yml +++ b/action.yml @@ -22,7 +22,8 @@ runs: run: | git clone https://github.com/edgee-cloud/edgee.git cd edgee - make + make dev.setup + cargo build mv edgee /usr/local/bin/ echo "Edgee built and added to path" shell: bash From b168eb828bc299608dc4f14a980d817c3ec320d7 Mon Sep 17 00:00:00 2001 From: Nicolas Girardot Date: Wed, 19 Feb 2025 10:26:54 +0100 Subject: [PATCH 3/9] feat: add rust --- action.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 7cb80d3..bb53ec3 100644 --- a/action.yml +++ b/action.yml @@ -17,12 +17,19 @@ runs: sudo apt-get update shell: bash + - name: Install Rust toolchain + if: inputs.build == 'true' + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + components: cargo + - name: Clone and Build Edgee if: inputs.build == 'true' run: | git clone https://github.com/edgee-cloud/edgee.git cd edgee - make dev.setup cargo build mv edgee /usr/local/bin/ echo "Edgee built and added to path" From a780ecdbed442c4ada511876290d4297404bc584 Mon Sep 17 00:00:00 2001 From: Nicolas Girardot Date: Wed, 19 Feb 2025 10:33:36 +0100 Subject: [PATCH 4/9] feat: change binary directory --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index bb53ec3..7f4c92e 100644 --- a/action.yml +++ b/action.yml @@ -31,7 +31,7 @@ runs: git clone https://github.com/edgee-cloud/edgee.git cd edgee cargo build - mv edgee /usr/local/bin/ + mv ./target/debug/edgee /usr/local/bin/ echo "Edgee built and added to path" shell: bash From 3fe951aa6e92928f0b89669e3bc4e7d2f756a057 Mon Sep 17 00:00:00 2001 From: Nicolas Girardot Date: Wed, 19 Feb 2025 11:50:18 +0100 Subject: [PATCH 5/9] feat: switch to true --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0bddf5a..d296132 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,4 +17,4 @@ jobs: - name: Test Setup Edgee Action uses: ./ with: - build: "true" + build: true From ba7468eaa8e5f07c81d0e883a909aa995e635872 Mon Sep 17 00:00:00 2001 From: Nicolas Girardot Date: Wed, 19 Feb 2025 12:04:11 +0100 Subject: [PATCH 6/9] feat: remove verification in test when it happens in action --- .github/workflows/install.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 10e593f..46beea8 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -16,6 +16,3 @@ jobs: - name: Test Setup Edgee Action uses: ./ - - - name: Verify Edgee Installation - run: edgee --version From dbdd574a6fc58304a34162937f45ae719285826d Mon Sep 17 00:00:00 2001 From: Nicolas Girardot Date: Wed, 19 Feb 2025 12:06:01 +0100 Subject: [PATCH 7/9] feat: switch output --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 7f4c92e..9c8c8a6 100644 --- a/action.yml +++ b/action.yml @@ -32,7 +32,7 @@ runs: cd edgee cargo build mv ./target/debug/edgee /usr/local/bin/ - echo "Edgee built and added to path" + echo "Edgee built and added to path" >> $GITHUB_OUTPUT shell: bash - name: Install Edgee @@ -40,7 +40,7 @@ runs: run: | curl https://install.edgee.cloud | sh mv edgee /usr/local/bin/ - echo "Edgee downloaded and added to path" + echo "Edgee downloaded and added to path" >> $GITHUB_OUTPUT shell: bash - name: Verify Edgee installation From 2b791eb7a21a8b1acab31f3f82bdfe959402e5aa Mon Sep 17 00:00:00 2001 From: Nicolas Girardot Date: Wed, 19 Feb 2025 12:09:58 +0100 Subject: [PATCH 8/9] feat: revert echo --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 9c8c8a6..7f4c92e 100644 --- a/action.yml +++ b/action.yml @@ -32,7 +32,7 @@ runs: cd edgee cargo build mv ./target/debug/edgee /usr/local/bin/ - echo "Edgee built and added to path" >> $GITHUB_OUTPUT + echo "Edgee built and added to path" shell: bash - name: Install Edgee @@ -40,7 +40,7 @@ runs: run: | curl https://install.edgee.cloud | sh mv edgee /usr/local/bin/ - echo "Edgee downloaded and added to path" >> $GITHUB_OUTPUT + echo "Edgee downloaded and added to path" shell: bash - name: Verify Edgee installation From c537dafee8f958b3b8ca8e36ff4856bed331a801 Mon Sep 17 00:00:00 2001 From: Nicolas Girardot Date: Wed, 19 Feb 2025 12:11:09 +0100 Subject: [PATCH 9/9] feat: used unarchived rus mpackage --- action.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/action.yml b/action.yml index 7f4c92e..ae62cf6 100644 --- a/action.yml +++ b/action.yml @@ -19,11 +19,7 @@ runs: - name: Install Rust toolchain if: inputs.build == 'true' - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - components: cargo + uses: dtolnay/rust-toolchain@stable - name: Clone and Build Edgee if: inputs.build == 'true'