Skip to content

Commit fc869c4

Browse files
authored
chore: Replace Makefile with atmos.yaml (#58)
1 parent 65a4012 commit fc869c4

File tree

4 files changed

+35
-62
lines changed

4 files changed

+35
-62
lines changed

Makefile

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

README.yaml

Lines changed: 33 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
#
32
# This is the canonical configuration for the `README.md`
43
# Run `make readme` to rebuild the `README.md`
@@ -22,13 +21,17 @@ github_repo: cloudposse/github-action-matrix-outputs-write
2221

2322
# Badges to display
2423
badges:
25-
- name: "Latest Release"
26-
image: "https://img.shields.io/github/release/cloudposse/github-action-matrix-outputs-write.svg"
27-
url: "https://github.com/cloudposse/github-action-matrix-outputs-write/releases/latest"
28-
- name: "Slack Community"
29-
image: "https://slack.cloudposse.com/badge.svg"
30-
url: "https://slack.cloudposse.com"
24+
- name: Latest Release
25+
image: https://img.shields.io/github/release/cloudposse/github-action-matrix-outputs-write.svg?style=for-the-badge
26+
url: https://github.com/cloudposse/github-action-matrix-outputs-write/releases/latest
27+
- name: Last Updated
28+
image: https://img.shields.io/github/last-commit/cloudposse/github-action-matrix-outputs-write.svg?style=for-the-badge
29+
url: https://github.com/cloudposse/github-action-matrix-outputs-write/commits
30+
- name: Slack Community
31+
image: https://slack.cloudposse.com/for-the-badge.svg
32+
url: https://cloudposse.com/slack
3133

34+
# List any related terraform modules that this module may be used with or that this module depends on.
3235
related:
3336
- name: "github-action-matrix-outputs-read"
3437
description: "Matrix outputs read"
@@ -42,25 +45,25 @@ introduction: |-
4245
GitHub actions have an [Jobs need a way to reference all outputs of matrix jobs](https://github.com/community/community/discussions/17245) issue.
4346
If there is a job that runs multiple times with `strategy.matrix` only the latest iteration's output availiable for
4447
reference in other jobs.
45-
48+
4649
There is a [workaround](https://github.com/community/community/discussions/17245#discussioncomment-3814009) to address the limitation.
4750
We implement the workaround with two GitHub Actions:
4851
* [Matrix Outputs Write](https://github.com/cloudposse/github-action-matrix-outputs-write)
4952
* [Matrix Outputs Read](https://github.com/cloudposse/github-action-matrix-outputs-read)
50-
53+
5154
## v1 - What's new
52-
55+
5356
> [!IMPORTANT]
5457
> cloudposse/github-action-matrix-outputs-write@v1+ is not currently supported on GHES yet. If you are on GHES, you
5558
> must use [v0](https://github.com/cloudposse/github-action-matrix-outputs-write/releases/tag/0.5.0).
56-
59+
5760
The release of `cloudposse/github-action-matrix-outputs-write@v1` and `cloudposse/github-action-matrix-outputs-read@v1`
5861
are major changes to the backend architecture of Artifacts. They have numerous performance and behavioral improvements.
59-
62+
6063
For more information, see the [`@actions/artifact`](https://github.com/actions/toolkit/tree/main/packages/artifact) documentation.
61-
64+
6265
### Breaking Changes
63-
66+
6467
1. On self hosted runners, additional [firewall rules](https://github.com/actions/toolkit/tree/main/packages/artifact#breaking-changes) may be required.
6568
2. Outputs writen with `cloudposse/github-action-matrix-outputs-write@v1` can not be read by `cloudposse/github-action-matrix-outputs-read@v0`and below versions.
6669
@@ -75,7 +78,7 @@ references:
7578
# How to use this project
7679
usage: |-
7780
Example how you can use workaround to reference matrix job outputs.
78-
81+
7982
```yaml
8083
name: Pull Request
8184
on:
@@ -92,7 +95,7 @@ usage: |-
9295
steps:
9396
- name: Checkout
9497
uses: actions/checkout@v3
95-
98+
9699
- name: Build
97100
id: build
98101
uses: cloudposse/[email protected]
@@ -113,7 +116,7 @@ usage: |-
113116
image: ${{ steps.build.outputs.image }}:${{ steps.build.outputs.tag }}
114117
## Multiline string
115118
tags: ${{ toJson(steps.build.outputs.image) }}
116-
119+
117120
## Read matrix outputs
118121
read:
119122
runs-on: ubuntu-latest
@@ -123,7 +126,7 @@ usage: |-
123126
id: read
124127
with:
125128
matrix-step-name: build
126-
129+
127130
outputs:
128131
result: "${{ steps.read.outputs.result }}"
129132
@@ -146,11 +149,11 @@ usage: |-
146149
```
147150
148151
### Reusable workflow example
149-
152+
150153
Reusable workflow that support matrix outputs
151-
154+
152155
`./.github/workflow/build-reusabled.yaml`
153-
156+
154157
```yaml
155158
name: Build - Reusable workflow
156159
on:
@@ -178,7 +181,7 @@ usage: |-
178181
image:
179182
description: "Image"
180183
value: ${{ jobs.write.outputs.image }}
181-
184+
182185
jobs:
183186
build:
184187
runs-on: ubuntu-latest
@@ -197,7 +200,7 @@ usage: |-
197200
PLATFORM=${{ inputs.platform }}
198201
outputs:
199202
image: ${{ needs.build.outputs.image }}:${{ needs.build.outputs.tag }}
200-
203+
201204
write:
202205
runs-on: ubuntu-latest
203206
needs: [build]
@@ -210,14 +213,14 @@ usage: |-
210213
matrix-key: ${{ inputs.matrix-key }}
211214
outputs: |-
212215
image: ${{ needs.build.outputs.image }}
213-
216+
214217
outputs:
215218
image: ${{ fromJson(steps.out.outputs.result).image }}
216219
image_alternative: ${{ steps.out.outputs.image }}
217220
```
218-
221+
219222
Then you can use the workflow with matrix
220-
223+
221224
```yaml
222225
name: Pull Request
223226
on:
@@ -269,9 +272,9 @@ usage: |-
269272
## This how you can reference matrix output
270273
actual: ${{ fromJson(needs.read.outputs.result).image.arm64v8 }}
271274
```
272-
275+
273276
or as a simple job
274-
277+
275278
```yaml
276279
name: Pull Request
277280
on:
@@ -300,10 +303,5 @@ usage: |-
300303
actual: ${{ needs.build.outputs.image }}
301304
```
302305
303-
include:
304-
- "docs/github-action.md"
305-
306-
# Contributors to this project
307-
contributors:
308-
- name: "Igor Rodionov"
309-
github: "goruha"
306+
include: []
307+
contributors: []

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)