-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
189 additions
and
123 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Build Test Release | ||
run-name: ${{ inputs.image_id }} | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
# e.g. ubuntu22-full-x64 | ||
image_id: | ||
required: true | ||
type: string | ||
outputs: | ||
ami_name: | ||
description: "The name of the built AMI" | ||
value: ${{ jobs.build.outputs.ami_name }} | ||
ami_id: | ||
description: "The ID of the built AMI" | ||
value: ${{ jobs.build.outputs.ami_id }} | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/build.yml | ||
with: | ||
image_id: ${{ inputs.image_id }} | ||
secrets: inherit | ||
|
||
test1: | ||
needs: build | ||
uses: ./.github/workflows/test.yml | ||
with: | ||
ami_id: ${{ needs.build.outputs.ami_id }} | ||
index: 1 | ||
|
||
test2: | ||
needs: test1 | ||
uses: ./.github/workflows/test.yml | ||
with: | ||
ami_id: ${{ needs.build.outputs.ami_id }} | ||
index: 2 | ||
|
||
test3: | ||
needs: test2 | ||
uses: ./.github/workflows/test.yml | ||
with: | ||
ami_id: ${{ needs.build.outputs.ami_id }} | ||
index: 3 | ||
|
||
test4: | ||
needs: test3 | ||
uses: ./.github/workflows/test.yml | ||
with: | ||
ami_id: ${{ needs.build.outputs.ami_id }} | ||
index: 4 | ||
|
||
test5: | ||
needs: test4 | ||
uses: ./.github/workflows/test.yml | ||
with: | ||
ami_id: ${{ needs.build.outputs.ami_id }} | ||
index: 5 | ||
|
||
release: | ||
needs: | ||
- build | ||
- test5 | ||
uses: ./.github/workflows/release.yml | ||
secrets: inherit | ||
with: | ||
image_id: ${{ inputs.image_id }} | ||
ami_name: ${{ needs.build.outputs.ami_name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Build and Release | ||
run-name: ${{ inputs.distribution }}-full-${{ inputs.architecture }} | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
image_id: | ||
required: true | ||
type: string | ||
outputs: | ||
ami_name: | ||
description: "The name of the built AMI" | ||
value: ${{ jobs.build.outputs.ami_name }} | ||
ami_id: | ||
description: "The ID of the built AMI" | ||
value: ${{ jobs.build.outputs.ami_id }} | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
SUBNET_ID: ${{ secrets.SUBNET_ID }} | ||
outputs: | ||
ami_name: ${{ steps.build.outputs.ami_name }} | ||
ami_id: ${{ steps.build.outputs.ami_id }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.2.2 | ||
bundler-cache: true | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-east-1 | ||
- run: bundle exec bin/build --image-id ${{ inputs.image_id }} | ||
id: build | ||
timeout-minutes: 300 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.PHONY: sync sync-* | ||
|
||
SHELL:=/bin/bash | ||
export AMI_PREFIX=runs-on-dev | ||
|
||
cleanup-dev: | ||
env $(shell cat .env) AMI_PREFIX=runs-on-dev ./bin/utils/cleanup-amis | ||
|
||
cleanup-prod: | ||
env $(shell cat .env) AMI_PREFIX=runs-on-v2.2 ./bin/utils/cleanup-amis | ||
|
||
sync: | ||
env $(shell cat .env) ./bin/sync | ||
|
||
sync-%: | ||
env $(shell cat .env) ./bin/sync --image-id $* | ||
|
||
# Build steps for each distribution and architecture | ||
build-%: sync-% | ||
env $(shell cat .env) ./bin/build --image-id $* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -123,6 +123,7 @@ source "amazon-ebs" "build_ebs" { | |
run_tags = { | ||
creator = "RunsOn" | ||
contact = "[email protected]" | ||
ami_name = "${var.ami_name}" | ||
} | ||
|
||
tags = { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -133,6 +133,7 @@ source "amazon-ebs" "build_ebs" { | |
run_tags = { | ||
creator = "RunsOn" | ||
contact = "[email protected]" | ||
ami_name = "${var.ami_name}" | ||
} | ||
|
||
tags = { | ||
|
Oops, something went wrong.