Skip to content
This repository was archived by the owner on Jan 16, 2025. It is now read-only.

Commit f9721cb

Browse files
authored
Merge pull request #2811 from philips-labs/develop
chore: sync develop to main
2 parents b404332 + eaf94a5 commit f9721cb

File tree

9 files changed

+483
-482
lines changed

9 files changed

+483
-482
lines changed

Diff for: .github/workflows/release.yml

+46-50
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ on:
44
push:
55
branches:
66
- main
7-
- develop
8-
workflow_dispatch:
7+
- refactor/release
98

109
jobs:
1110
prepare:
@@ -15,6 +14,9 @@ jobs:
1514
strategy:
1615
matrix:
1716
lambda: ["modules/webhook/lambdas/webhook", "modules/runner-binaries-syncer/lambdas/runner-binaries-syncer", "modules/runners/lambdas/runners"]
17+
permissions:
18+
contents: read
19+
actions: write
1820
steps:
1921
- name: Extract lambda name
2022
id: lambda
@@ -38,65 +40,59 @@ jobs:
3840
runs-on: ubuntu-latest
3941
needs:
4042
prepare
43+
outputs:
44+
upload_url: ${{ steps.release.outputs.upload_url }}
45+
releases_created: ${{ steps.release.outputs.releases_created }}
46+
permissions:
47+
contents: write
48+
issues: write
49+
pull-requests: write
50+
actions: write
4151
steps:
42-
- uses: actions/checkout@v3
43-
with:
44-
fetch-depth: 0
45-
persist-credentials: false
46-
- uses: actions/download-artifact@v3
47-
with:
48-
name: webhook
49-
path: artifacts
50-
- uses: actions/download-artifact@v3
51-
with:
52-
name: runners
53-
path: artifacts
54-
- uses: actions/download-artifact@v3
55-
with:
56-
name: runner-binaries-syncer
57-
path: artifacts
58-
5952
- name: Get installation token
6053
uses: npalm/[email protected]
61-
id: app-token
54+
id: token
6255
with:
6356
appId: ${{ secrets.FOREST_RELEASER_APP_ID }}
6457
appPrivateKeyBase64: ${{ secrets.FOREST_RELEASER_APP_PRIVATE_KEY_BASE64 }}
6558
appInstallationType: repo
6659
appInstallationValue: ${{ github.repository }}
6760

68-
- name: Dry run release
69-
if: github.event_name != 'pull_request'
70-
env:
71-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Read only token
72-
run: |
73-
cp .release/* .
74-
yarn
75-
yarn release -d --repositoryUrl https://x-access-token:[email protected]/$GITHUB_REPOSITORY.git
76-
61+
# bootstrap-sha and release-as needs to be removed after first release
7762
- name: Release
78-
if: github.event_name != 'pull_request' && contains('refs/heads/main', github.ref)
79-
env:
80-
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
81-
run: |
82-
cp .release/* .
83-
yarn
84-
yarn release --repositoryUrl https://x-access-token:[email protected]/$GITHUB_REPOSITORY.git
85-
86-
provenance:
87-
name: Generate provenance
88-
runs-on: ubuntu-20.04
89-
needs:
90-
release
91-
if: startsWith(github.ref, 'refs/tags/')
63+
id: release
64+
uses: google-github-actions/release-please-action@5c07f8be172b1f6e90f9c35baf8184461b91b85f # ratchet:google-github-actions/release-please-action@v3
65+
with:
66+
default-branch: main
67+
release-type: terraform-module
68+
token: ${{ steps.token.outputs.token }}
69+
last-release-sha: b404332ff8b401a5a8958317a69b9f849b794a16
70+
71+
assets:
72+
name: upload assets
73+
if: ${{ needs.release.outputs.releases_created }}
74+
needs: release
75+
runs-on: ubuntu-latest
76+
strategy:
77+
matrix:
78+
asset: ["webhook", "runner-binaries-syncer", "runners"]
79+
permissions:
80+
contents: write
81+
actions: read
9282

9383
steps:
94-
- name: Generate provenance for release
95-
uses: philips-labs/[email protected]
84+
- uses: actions/download-artifact@v3
9685
with:
97-
artifact_path: release-assets
98-
output_path: 'build.provenance'
99-
tag_name: "${{ github.ref_name }}"
100-
env:
101-
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
86+
name: ${{ matrix.asset }}
87+
path: artifacts
10288

89+
- name: Upload Release Asset
90+
id: upload-release-asset
91+
uses: actions/upload-release-asset@v1
92+
env:
93+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
94+
with:
95+
upload_url: ${{ needs.release.outputs.upload_url }}
96+
asset_path: artifacts/${{ matrix.asset }}.zip
97+
asset_name: ${{ matrix.asset }}.zip
98+
asset_content_type: application/zip

Diff for: README.md

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
This [Terraform](https://www.terraform.io/) module creates the required infrastructure needed to host [GitHub Actions](https://github.com/features/actions) self-hosted, auto-scaling runners on [AWS spot instances](https://aws.amazon.com/ec2/spot/). It provides the required logic to handle the life cycle for scaling up and down using a set of AWS Lambda functions. Runners are scaled down to zero to avoid costs when no workflows are active.
66

7+
> 📢 [Upcoming v2](https://github.com/philips-labs/terraform-aws-github-runner/issues/2517): We are busy with merging `next` back in to `main`. From that moment on we will not actively support v1. We will maintain for some moment a `v1` branch. Default PR's will go only back into main (`v2`). In case you woul like to get work explicit back in `v1` consider a PR to `v1`.
8+
79
> 📢 HELP WANTED: We are running the AWS self-hosted GitHub runners OS project in Philips Labs for over two years! And we are incredibly happy with all the feedback and contribution of the open-source community. In the next months we will speak at some conferences to share the solution and story of running this open-source project. Via [this questionaire](https://forms.office.com/r/j03CUzdLFp) we would like to gather feedback from the community to use in our talks.
810
911
- [Motivation](#motivation)

Diff for: modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,12 @@
1919
"@octokit/rest": "^19.0.5",
2020
"@trivago/prettier-plugin-sort-imports": "^4.0.0",
2121
"@types/jest": "^29.2.4",
22-
"@types/node": "^18.11.14",
22+
"@types/node": "^18.11.18",
2323
"@types/request": "^2.48.8",
24-
"@typescript-eslint/eslint-plugin": "^5.46.1",
25-
"@typescript-eslint/parser": "^5.46.1",
24+
"@typescript-eslint/eslint-plugin": "^5.47.1",
25+
"@typescript-eslint/parser": "^5.47.1",
2626
"@vercel/ncc": "^0.36.0",
27-
"aws-sdk": "^2.1273.0",
28-
"eslint": "^8.29.0",
27+
"eslint": "^8.30.0",
2928
"eslint-plugin-prettier": "4.2.1",
3029
"jest": "^29.3",
3130
"jest-mock": "^29.3.1",
@@ -36,6 +35,7 @@
3635
},
3736
"dependencies": {
3837
"axios": "^1.2.1",
38+
"aws-sdk": "^2.1283.0",
3939
"tslog": "^3.3.4"
4040
}
4141
}

0 commit comments

Comments
 (0)