You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2023/11/01 08:58:55 UTC
(incubator-opendal) branch main updated: ci: Switch to 1password connect to avoid rate limit (#3447)
This is an automated email from the ASF dual-hosted git repository.
xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git
The following commit(s) were added to refs/heads/main by this push:
new 0b7ac81cc ci: Switch to 1password connect to avoid rate limit (#3447)
0b7ac81cc is described below
commit 0b7ac81cc0ade123f7b195771ae514bc8fc1e7c6
Author: Xuanwo <gi...@xuanwo.io>
AuthorDate: Wed Nov 1 16:58:51 2023 +0800
ci: Switch to 1password connect to avoid rate limit (#3447)
* ci: Switch to 1password connect to avoid rate limit
Signed-off-by: Xuanwo <gi...@xuanwo.io>
* Fix typo
Signed-off-by: Xuanwo <gi...@xuanwo.io>
* FIx typo
Signed-off-by: Xuanwo <gi...@xuanwo.io>
* Test
Signed-off-by: Xuanwo <gi...@xuanwo.io>
* Fix typo
Signed-off-by: Xuanwo <gi...@xuanwo.io>
* Migrate all
Signed-off-by: Xuanwo <gi...@xuanwo.io>
* Test
Signed-off-by: Xuanwo <gi...@xuanwo.io>
---------
Signed-off-by: Xuanwo <gi...@xuanwo.io>
---
.github/scripts/behavior_test/plan.py | 4 ++--
.github/workflows/behavior_test_binding_java.yml | 8 +++++---
.github/workflows/behavior_test_binding_python.yml | 9 ++++++---
.github/workflows/behavior_test_core.yml | 8 +++++---
4 files changed, 18 insertions(+), 11 deletions(-)
diff --git a/.github/scripts/behavior_test/plan.py b/.github/scripts/behavior_test/plan.py
index c7de32140..aae0a2248 100755
--- a/.github/scripts/behavior_test/plan.py
+++ b/.github/scripts/behavior_test/plan.py
@@ -50,9 +50,9 @@ def provided_cases() -> list[dict[str, str]]:
# Check if this workflow needs to read secrets.
#
- # We will check if pattern `secrets.XXX` exist in content.
+ # We will check if pattern `op://services` exist in content.
if not os.getenv("GITHUB_HAS_SECRETS") == "true":
- cases[:] = [v for v in cases if "secrets" not in v["content"]]
+ cases[:] = [v for v in cases if "op://services" not in v["content"]]
# Remove content from cases.
cases = [
diff --git a/.github/workflows/behavior_test_binding_java.yml b/.github/workflows/behavior_test_binding_java.yml
index 3a780d468..de7010422 100644
--- a/.github/workflows/behavior_test_binding_java.yml
+++ b/.github/workflows/behavior_test_binding_java.yml
@@ -47,10 +47,12 @@ jobs:
# TODO: 1password is only supported on linux
#
# Waiting for https://github.com/1Password/load-secrets-action/issues/46
- - name: Setup service account token for 1password
+ - name: Setup 1Password Connect
if: runner.os == 'Linux'
- shell: bash
- run: echo "OP_SERVICE_ACCOUNT_TOKEN=${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}" >> $GITHUB_ENV
+ uses: 1password/load-secrets-action/configure@v1
+ with:
+ connect-host: ${{ secrets.OP_CONNECT_HOST }}
+ connect-token: ${{ secrets.OP_CONNECT_TOKEN }}
- name: Test Core
uses: ./.github/actions/behavior_test_binding_java
diff --git a/.github/workflows/behavior_test_binding_python.yml b/.github/workflows/behavior_test_binding_python.yml
index ed6b099d2..6c5c09beb 100644
--- a/.github/workflows/behavior_test_binding_python.yml
+++ b/.github/workflows/behavior_test_binding_python.yml
@@ -47,10 +47,13 @@ jobs:
# TODO: 1password is only supported on linux
#
# Waiting for https://github.com/1Password/load-secrets-action/issues/46
- - name: Setup service account token for 1password
+ - name: Setup 1Password Connect
if: runner.os == 'Linux'
- shell: bash
- run: echo "OP_SERVICE_ACCOUNT_TOKEN=${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}" >> $GITHUB_ENV
+ uses: 1password/load-secrets-action/configure@v1
+ with:
+ connect-host: ${{ secrets.OP_CONNECT_HOST }}
+ connect-token: ${{ secrets.OP_CONNECT_TOKEN }}
+
- uses: actions/setup-python@v4
with:
python-version: '3.11'
diff --git a/.github/workflows/behavior_test_core.yml b/.github/workflows/behavior_test_core.yml
index 03d542f26..4f7fdff62 100644
--- a/.github/workflows/behavior_test_core.yml
+++ b/.github/workflows/behavior_test_core.yml
@@ -47,10 +47,12 @@ jobs:
# TODO: 1password is only supported on linux
#
# Waiting for https://github.com/1Password/load-secrets-action/issues/46
- - name: Setup service account token for 1password
+ - name: Setup 1Password Connect
if: runner.os == 'Linux'
- shell: bash
- run: echo "OP_SERVICE_ACCOUNT_TOKEN=${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}" >> $GITHUB_ENV
+ uses: 1password/load-secrets-action/configure@v1
+ with:
+ connect-host: ${{ secrets.OP_CONNECT_HOST }}
+ connect-token: ${{ secrets.OP_CONNECT_TOKEN }}
- name: Test Core
uses: ./.github/actions/behavior_test_core