Skip to content

Commit bb26eee

Browse files
authored
Replace Makefile with atmos.yaml (#6)
## what - Remove `Makefile` - Add `atmos.yaml` ## why - Replace `build-harness` with `atmos` for readme genration ## References * DEV-3229 Migrate from build-harness to atmos
1 parent e823005 commit bb26eee

File tree

5 files changed

+22
-55
lines changed

5 files changed

+22
-55
lines changed

.github/workflows/test-negative.yml

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,31 @@
11
name: Test Negative
22
on:
3-
workflow_dispatch: {}
4-
3+
workflow_dispatch:
4+
inputs:
5+
ref:
6+
description: The fully-formed ref of the branch or tag that triggered the workflow run
7+
required: false
8+
type: string
9+
sha:
10+
description: The sha of the commit that triggered the workflow run
11+
required: false
12+
type: string
513
permissions:
614
contents: write
715
pull-requests: write
8-
916
jobs:
1017
setup:
1118
runs-on: ubuntu-latest
1219
steps:
1320
- name: Setup
1421
run: echo "Do setup"
15-
1622
create-release:
1723
runs-on: ubuntu-latest
1824
continue-on-error: true
1925
needs: [setup]
2026
steps:
2127
- name: Checkout
2228
uses: actions/checkout@v3
23-
2429
- id: create-release
2530
run: |
2631
release_name="${PREFIX}$(git rev-parse --short HEAD)"
@@ -32,61 +37,51 @@ jobs:
3237
# The action will not pick up a comment because the provided 'include_regex' will not be able to match it.
3338
PREFIX: "v0.0.0-test.exclude."
3439
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35-
3640
outputs:
3741
name: ${{ steps.create-release.outputs.name }}
3842
tag: ${{ steps.create-release.outputs.tag }}
39-
4043
assert:
4144
runs-on: ubuntu-latest
4245
needs: [create-release]
4346
outputs:
4447
comment-id: ${{ steps.fc.outputs.comment-id }}
4548
steps:
4649
- uses: actions/checkout@v4
47-
4850
- uses: ./
4951
id: action
5052
with:
5153
tag: ${{ needs.create-release.outputs.tag }}
5254
include_regex: 'v0\.0\.0-test\.include\..*' # Should NOT find a comment
53-
5455
- name: debug
5556
run: |
5657
echo "${{ fromJSON(steps.action.outputs.result) }}"
57-
5858
- name: Find Comment
5959
uses: peter-evans/find-comment@v3
6060
id: fc
6161
continue-on-error: true
6262
with:
6363
issue-number: ${{ fromJSON(steps.action.outputs.result).comments[0].pull_request }}
6464
body-includes: ${{ needs.create-release.outputs.tag }}
65-
6665
- name: Fail if comment was found
6766
if: ${{ always() && steps.fc.outputs.comment-id != 0 }}
6867
run: |
6968
exit 1
70-
7169
- name: Succeed if comment was not found
7270
if: ${{ always() && steps.fc.outputs.comment-id == 0 }}
7371
run: |
7472
exit 0
75-
7673
teardown:
7774
runs-on: ubuntu-latest
7875
needs: [create-release, assert]
7976
if: ${{ always() }}
8077
steps:
8178
- name: Checkout
8279
uses: actions/checkout@v3
83-
8480
- name: Delete Test Release + Tag
8581
if: needs.create-release.result == 'success'
8682
run: gh release delete ${{ needs.create-release.outputs.name }} --cleanup-tag
8783
env:
8884
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
89-
9085
- uses: octokit/[email protected]
9186
name: Delete Test Release Comment
9287
if: ${{ always() && needs.assert.outputs.comment-id != 0 }}

.github/workflows/test-positive.yml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,31 @@
11
name: Test Positive
22
on:
3-
workflow_dispatch: {}
4-
3+
workflow_dispatch:
4+
inputs:
5+
ref:
6+
description: The fully-formed ref of the branch or tag that triggered the workflow run
7+
required: false
8+
type: string
9+
sha:
10+
description: The sha of the commit that triggered the workflow run
11+
required: false
12+
type: string
513
permissions:
614
contents: write
715
pull-requests: write
8-
916
jobs:
1017
setup:
1118
runs-on: ubuntu-latest
1219
steps:
1320
- name: Setup
1421
run: echo "Do setup"
15-
1622
create-release:
1723
runs-on: ubuntu-latest
1824
continue-on-error: true
1925
needs: [setup]
2026
steps:
2127
- name: Checkout
2228
uses: actions/checkout@v3
23-
2429
- id: create-release
2530
run: |
2631
release_name="${PREFIX}$(git rev-parse --short HEAD)"
@@ -32,50 +37,42 @@ jobs:
3237
# The action _will_ pick up a comment because the provided 'include_regex' will be able to match it.
3338
PREFIX: "v0.0.0-test.include."
3439
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35-
3640
outputs:
3741
name: ${{ steps.create-release.outputs.name }}
3842
tag: ${{ steps.create-release.outputs.tag }}
39-
4043
assert:
4144
runs-on: ubuntu-latest
4245
needs: [create-release]
4346
outputs:
4447
comment-id: ${{ steps.fc.outputs.comment-id }}
4548
steps:
4649
- uses: actions/checkout@v4
47-
4850
- uses: ./
4951
id: action
5052
with:
5153
tag: ${{ needs.create-release.outputs.tag }}
5254
include_regex: 'v0\.0\.0-test\.include\..*' # Should find a comment
53-
5455
- name: debug
5556
run: |
5657
echo "${{ fromJSON(steps.action.outputs.result) }}"
57-
5858
- name: Find Comment
5959
uses: peter-evans/find-comment@v3
6060
id: fc
6161
with:
6262
issue-number: ${{ fromJSON(steps.action.outputs.result).comments[0].pull_request }}
6363
body-includes: ${{ needs.create-release.outputs.tag }}
64-
6564
teardown:
6665
runs-on: ubuntu-latest
6766
needs: [create-release, assert]
6867
if: ${{ always() }}
6968
steps:
7069
- name: Checkout
7170
uses: actions/checkout@v3
72-
7371
- name: Delete Test Release + Tag
7472
if: needs.create-release.result == 'success'
7573
run: gh release delete ${{ needs.create-release.outputs.name }} --cleanup-tag
7674
env:
7775
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78-
7976
- uses: octokit/[email protected]
8077
name: Delete Test Release Comment
8178
if: ${{ always() && needs.assert.outputs.comment-id != 0 }}

Makefile

Lines changed: 0 additions & 10 deletions
This file was deleted.

atmos.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import:
2+
- https://raw.githubusercontent.com/cloudposse/.github/refs/heads/main/.github/atmos/github-action.yaml

docs/github-action.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)