Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download release binary #2

Merged
merged 5 commits into from
Mar 13, 2024
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
1 change: 1 addition & 0 deletions .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
continue-on-error: true # TODO for now, we're expecting the program to exit 2 when usage is called
with:
args: -h # TODO we might decide to report a valid test event to test infrastructure when it is set up
version: "*" # use the latest version

- name: Assert against outputs
if: ${{ (steps.test-action.outputs.exit-code != 2) || (!contains(steps.test-action.outputs.output, 'report-event')) }}
Expand Down
17 changes: 0 additions & 17 deletions .goreleaser.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,3 @@ The action is written in Typescript at `src/index.ts`, and it uses [`ncc`](https

After changing the source code in `src/index.ts`, you must compile the code to see the changes reflected in the GitHub Action. There is a workflow, `.github/workflows/check-compile.yml`, that will remind you to do this by failing if it finds that the code was not compiled.

### Building the `report-event` binaries

[TODO] This is a provisional process until we automate the release and consumption of the `report-event` binaries

This repo contains a `.goreleaser.yaml` configuration file that is used to build binaries of the `report-event` program for the [combinations of OS and architecture available on public GitHub Actions runners](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories). These binaries are a dependency of this Action. To build the binaries:

1. [Install goreleaser](https://goreleaser.com/install/)
2. Clone the [mac-fc-dso-metrics repo](https://github.com/Enterprise-CMCS/mac-fc-dso-metrics)
3. In the root directory of that repo, run `goreleaser build --snapshot --clean --config <path-to-.goreleaser.yaml>`. This will generate a `dist` folder with the binaries and some metadata files
4. Copy the `dist` folder and its contents to this repo

6 changes: 6 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ description: 'Sends event data to the MACBIS DevSecOps Metrics API'
inputs:
args:
description: Arguments to pass to the report-event program. Please see Enterprise-CMCS/mac-fc-dso-metrics/cmd/report-event/README.md for documentation
version:
description: The version constraint for the report-event program in semantic version syntax. Defaults to the latest version (we recommend pinning to a specific version or range)
default: "*"
token:
description: The GitHub token used to list the (public) releases of report-event. A token is required to avoid the low non-authenticated rate limit. We recommend using the default GITHUB_TOKEN
default: ${{ github.token }}
outputs:
exit-code:
description: The exit code of the program
Expand Down
Loading