From 13933b8a735be9589638a4fe68fead0bdb76edf8 Mon Sep 17 00:00:00 2001 From: Andrey Meshkov Date: Sat, 27 Apr 2024 20:08:26 +0300 Subject: [PATCH] Beautified example.yml --- bamboo-specs/example.yaml | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/bamboo-specs/example.yaml b/bamboo-specs/example.yaml index 73643f4..bd2aaba 100644 --- a/bamboo-specs/example.yaml +++ b/bamboo-specs/example.yaml @@ -1,3 +1,13 @@ +# This is an example Atlassian Bamboo CI configuration that demonstrates how to +# use github-actions-runner to run a GitHub Actions workflow in a Bamboo CI job. +# +# Check out .github/workflows/example.yml to see what workflow this Bamboo job +# actually runs. +# +# This example demonstrates how to: +# * Trigger a workflow run. +# * Download the artifacts produced by the workflow. +# * Pass secrets from the CI to the workflow. --- version: 2 plan: @@ -5,8 +15,10 @@ plan: key: GHACTIONSRUNEXAMPLE name: github-actions-runner - example variables: - # TODO replace to :latest-ci - dockerNode: ghcr.io/adguardteam/githubactionsrunner:latest-no-entrypoint + # 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 stages: - Test: @@ -21,8 +33,6 @@ Test: clean-working-dir: true docker: image: ${bamboo.dockerNode} - volumes: - ${system.PNPM_DIR}: ${bamboo.cachePnpm} tasks: - checkout: force-clean-build: true @@ -30,23 +40,21 @@ Test: interpreter: SHELL scripts: - |- - set -x + # Make sure the script fails on any error. set -e - # Combine stderr and stdout for consistent log output + # Combine stderr and stdout for consistent log output. exec 2>&1 - ls -laht - - branch="${bamboo_planRepository_branchName}" - revision="${bamboo_planRepository_revision}" - GITHUB_TOKEN=${bamboo.githubActionsRunnerPassword} github-actions-runner run-action \ --repo AdguardTeam/GithubActionsRunner \ - --branch "$branch" \ - --rev "$revision" \ + --branch "${bamboo_planRepository_branchName}" \ + --rev "${bamboo_planRepository_revision}" \ --workflow example.yml \ - --artifacts-path . \ + --artifacts-path . + # 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