Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
156 changes: 156 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
name: Documentation

on:
push:
branches: [main]
paths:
- 'docs/website/**'
- 'CHANGELOG.md'
- '.github/workflows/docs.yml'
pull_request:
branches: [main]
paths:
- 'docs/website/**'
- 'CHANGELOG.md'
- '.github/workflows/docs.yml'
types: [opened, synchronize, reopened]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
name: Build Documentation
runs-on: ubuntu-latest
if: |
github.event_name == 'push' ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'pull_request' && !startsWith(github.head_ref, 'docs/version-'))

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: docs/website/package-lock.json

- name: Install dependencies
working-directory: docs/website
run: npm ci

- name: Sync versions.json with existing docs
working-directory: docs/website
run: |
echo "=== Syncing versions.json with existing versioned docs ==="
echo "[]" > versions.json

if [ -d "versioned_docs" ]; then
echo "Checking for version directories..."
VERSIONS=$(find versioned_docs -maxdepth 1 -type d -name "version-*" 2>/dev/null | sed 's|.*/version-||' | sort -V -r)

if [ -n "$VERSIONS" ]; then
echo "$VERSIONS" | jq -R . | jq -s . > versions.json
VERSION_COUNT=$(echo "$VERSIONS" | wc -l | tr -d ' ')
echo "✓ Updated versions.json with $VERSION_COUNT version(s)"
else
echo "✓ No version directories found, keeping empty array"
fi
else
echo "✓ No versioned_docs directory, keeping empty array"
fi

echo "Final versions.json:"
cat versions.json

if ! jq empty versions.json 2>/dev/null; then
echo "ERROR: versions.json is invalid JSON!"
echo "[]" > versions.json
exit 1
fi

rm -rf .docusaurus
echo "✓ Cleared Docusaurus cache"

- name: Build documentation
working-directory: docs/website
run: npm run build
env:
NODE_ENV: production

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/website/build

deploy:
name: Deploy Documentation
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main'

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

test:
name: Test Documentation Build
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: docs/website/package-lock.json

- name: Install dependencies
working-directory: docs/website
run: npm ci

- name: Remove versioned docs for PR check
working-directory: docs/website
run: |
echo "Cleaning up versioned docs for PR validation..."
rm -rf versioned_docs versioned_sidebars
if [ -f "versions.json" ]; then
echo "[]" > versions.json
fi
rm -rf .docusaurus
echo "✓ Versioned docs cleaned up"

- name: Build and validate documentation
working-directory: docs/website
run: |
echo "Building documentation (versioning disabled for PR check)..."
npm run build -- --no-minify
echo "✓ Documentation build successful!"
env:
NODE_ENV: production
DISABLE_VERSIONING: 'true'
15 changes: 7 additions & 8 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ jobs:
acloud_client_id: ${{ secrets.ACLOUD_CLIENT_ID }}
acloud_client_secret: ${{ secrets.ACLOUD_CLIENT_SECRET }}
acloud_project_id: ${{ secrets.ACLOUD_PROJECT_ID }}
vpc_uri: ${{ secrets.ACLOUD_VPC_URI }}
subnet_uri: ${{ secrets.ACLOUD_SUBNET_URI }}
security_group_uri: ${{ secrets.ACLOUD_SECURITY_GROUP_URI }}
keypair_uri: ${{ secrets.ACLOUD_KEYPAIR_URI }}
vpc_id: ${{ secrets.ACLOUD_VPC_ID }}
subnet_id: ${{ secrets.ACLOUD_SUBNET_ID }}
security_group_id: ${{ secrets.ACLOUD_SECURITY_GROUP_ID }}
keypair_id: ${{ secrets.ACLOUD_KEYPAIR_ID }}
name: test-${{ github.run_id }}-${{ github.run_attempt }}
flavor: ${{ inputs.flavor }}
image: ${{ inputs.image }}
Expand Down Expand Up @@ -123,13 +123,12 @@ jobs:
ACLOUD_PROJECT_ID: ${{ needs.start-runner.outputs.project_id }}
SERVER_ID: ${{ needs.start-runner.outputs.server_id }}
run: |
acloud config set \
--client-id "$ACLOUD_CLIENT_ID" \
--client-secret "$ACLOUD_CLIENT_SECRET"
ACLOUD_CLIENT_SECRET="$ACLOUD_CLIENT_SECRET" \
acloud config set --client-id "$ACLOUD_CLIENT_ID"
acloud context set default --project-id "$ACLOUD_PROJECT_ID"

STATUS=$(acloud compute cloudserver get "$SERVER_ID" \
--output json 2>/dev/null \
--verbose 2>/dev/null \
| jq -r '.status // empty' || echo "not-found")

echo "Post-delete server status: '${STATUS}'"
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@ others/

# Local test config (may contain credentials)
test
.tokensave

# Docusaurus
docs/website/node_modules/
docs/website/build/
docs/website/.docusaurus/
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

---

## [Unreleased]
## [1.0.0] - 2026-07-29

### Added
- `action.yml`: composite GitHub Action with full input/output definitions; auto-installs `acloud-cli`
Expand All @@ -17,3 +17,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- `README.md`: quickstart workflow, input/output reference, flavor table, OS image table, regions, troubleshooting
- CI: `shellcheck` linting workflow and Dependabot for Actions version updates
- Integration test workflow (`workflow_dispatch`)

### Breaking changes (requires acloud-cli v1.0.0+)
- Inputs `vpc_uri`, `subnet_uri`, `security_group_uri`, `keypair_uri` renamed to `vpc_id`, `subnet_id`, `security_group_id`, `keypair_id` to match the new acloud-cli flag names
- `keypair_id` is now optional (was required in the previous release)
- Authentication: `--client-secret` flag removed from `acloud config set`; pass the secret via the `ACLOUD_CLIENT_SECRET` environment variable instead (handled internally — no action input change required)
- `acloud-cli` config is now stored at `~/.config/acloud/config.yaml` (XDG Base Directory)
- GitHub Actions secrets for the integration test workflow renamed: `ACLOUD_VPC_URI→ACLOUD_VPC_ID`, `ACLOUD_SUBNET_URI→ACLOUD_SUBNET_ID`, `ACLOUD_SECURITY_GROUP_URI→ACLOUD_SECURITY_GROUP_ID`, `ACLOUD_KEYPAIR_URI→ACLOUD_KEYPAIR_ID`
14 changes: 7 additions & 7 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ On-demand self-hosted GitHub Actions runners on Aruba Cloud. Each workflow run p

### Authentication (CI/CD)
```sh
acloud config set --client-id "$ACLOUD_CLIENT_ID" --client-secret "$ACLOUD_CLIENT_SECRET"
ACLOUD_CLIENT_SECRET="$ACLOUD_CLIENT_SECRET" acloud config set --client-id "$ACLOUD_CLIENT_ID"
acloud context set default --project-id "$ACLOUD_PROJECT_ID"
```
Credentials are stored in `~/.acloud.yaml` (permissions `0600`).
Credentials are stored in `~/.config/acloud/config.yaml` (XDG Base Directory, permissions `0600`).

### Key server commands
```sh
Expand All @@ -29,11 +29,11 @@ acloud compute cloudserver create \
--region "ITBG-Bergamo" \
--zone "ITBG-1" \
--flavor "CSO4A8" \
--image "ubuntu-22.04" \
--vpc-uri "<uri>" \
--subnet-uri "<uri>" \
--security-group-uri "<uri>" \
--keypair-uri "<uri>" \
--boot-disk-id "<id>" \
--vpc-id "<id>" \
--subnet-id "<id>" \
--security-group-id "<id>" \
--keypair-id "<id>" \
--user-data-file cloud-init.yml

acloud compute cloudserver list
Expand Down
17 changes: 17 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Contributing

Thank you for your interest in contributing to `acloud-github-runner`!

See the full [Contributing Guide](docs/website/docs/contributing.md) for detailed instructions.

## Quick summary

1. Open an [issue](https://github.com/Arubacloud/acloud-github-runner/issues) to discuss the change you want to make.
2. Fork the repository and create a branch: `feat/<description>`.
3. Make your changes and ensure `shellcheck action.sh runner-install.sh` passes.
4. Update `CHANGELOG.md` under `[Unreleased]`.
5. Open a pull request with a clear description of what changed and why.

## Code of Conduct

This project follows the [Contributor Covenant Code of Conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct/). Please be respectful and inclusive.
Loading
Loading