From 1e4c1cb2e5fdd86041ccb4f0a38aa28f3055e4b4 Mon Sep 17 00:00:00 2001 From: Maxim Topciu Date: Sat, 27 Apr 2024 20:48:26 +0300 Subject: [PATCH] simplify example plans --- .github/workflows/example.yml | 26 +++----------------------- bamboo-specs/example.yaml | 9 +++++---- 2 files changed, 8 insertions(+), 27 deletions(-) diff --git a/.github/workflows/example.yml b/.github/workflows/example.yml index bc073e3..b034e07 100644 --- a/.github/workflows/example.yml +++ b/.github/workflows/example.yml @@ -1,9 +1,6 @@ # Example workflow for github-actions-runner name: Example -env: - NODE_VERSION: 20 - on: workflow_dispatch: inputs: @@ -24,35 +21,18 @@ jobs: with: # Number of commits to fetch. 0 indicates all history. fetch-depth: 0 - - name: Setup pnpm - uses: pnpm/action-setup@v3 - with: - version: 8 - - name: Setup Node.js environment - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} - cache: pnpm - name: Run bash commands shell: bash run: | ls -alt - # Install deps - pnpm install - # Building package artifact - pnpm pack && mv adguard-github-actions-runner-*.tgz github-actions-runner.tgz + echo "example" > example.txt # Show that secrets are encoded echo "Secret is ${{ secrets.SECRET_KEY }}" - name: Save archived package uses: actions/upload-artifact@v4 with: - name: github-actions-runner.tgz - path: ./github-actions-runner.tgz - - name: Save build.txt - uses: actions/upload-artifact@v4 - with: - name: build.txt - path: ./dist/build.txt + name: example.txt + path: ./example.txt diff --git a/bamboo-specs/example.yaml b/bamboo-specs/example.yaml index bd2aaba..184a4d1 100644 --- a/bamboo-specs/example.yaml +++ b/bamboo-specs/example.yaml @@ -18,7 +18,7 @@ variables: # Using github-actions-runner Docker image for the latest stable version. # latest-ci docker image does not have any entrypoint and has the # runner installed. - dockerNode: ghcr.io/adguardteam/githubactionsrunner:latest-ci + docker: ghcr.io/adguardteam/githubactionsrunner:latest-ci stages: - Test: @@ -32,7 +32,7 @@ Test: other: clean-working-dir: true docker: - image: ${bamboo.dockerNode} + image: ${bamboo.docker} tasks: - checkout: force-clean-build: true @@ -52,12 +52,13 @@ Test: --rev "${bamboo_planRepository_revision}" \ --workflow example.yml \ --artifacts-path . + --secret SECRET_KEY=SECRET_VALUE # The artifacts produced by the workflow are downloaded and shared with the # Bamboo CI job. These artifacts can be then shared with other unrelated # Bamboo builds. artifacts: - - name: github-actions-runner.tgz - pattern: github-actions-runner.tgz + - name: example.txt + pattern: example.txt shared: true required: true requirements: