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

Update action versions and standards #41

Merged
merged 9 commits into from
Sep 18, 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/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: CI

on:
pull_request:
push:
branches: [main]

jobs:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ jobs:
- test
name: Release
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: open-turo/actions-gha/release@v2
env:
Expand Down
26 changes: 15 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0 # Use the ref you want to point at
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.18.0
hooks:
- id: check-json
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: commitlint
stages: [commit-msg]
additional_dependencies: ["@open-turo/commitlint-config-conventional"]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
stages: [commit]
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.16.0
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0 # Use the ref you want to point at
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ["@open-turo/commitlint-config-conventional"]
- id: check-json
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
exclude: |
(?x)^(
.*/README.md
)$
- repo: https://github.com/rhysd/actionlint
rev: v1.7.1
hooks:
Expand Down
7 changes: 7 additions & 0 deletions docs/breaking-changes/v3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Breaking changes in v3

The `go-version` input in the `release` and `prerelease` actions no longer exists.

The action will use the installed version in the runner.

The `push-docker-snapshot` input in the `prerelease` action no longer exists. Instead, set the `create-prerelease` input to true.
8 changes: 4 additions & 4 deletions integration-test/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# GitHub Action Integration-Test

<!-- prettier-ignore-start -->
<!-- action-docs-description source="integration-test/action.yaml" -->
<!-- action-docs-description source="action.yaml" -->
## Description

Conditionally executes golang integration tests via docker, if docker compose file is found
<!-- action-docs-description source="integration-test/action.yaml" -->
<!-- action-docs-description source="action.yaml" -->

<!-- action-docs-usage source="integration-test/action.yaml" -->
<!-- action-docs-usage source="action.yaml" -->
## Usage

```yaml
Expand Down Expand Up @@ -37,7 +37,7 @@ Conditionally executes golang integration tests via docker, if docker compose fi
# Required: false
# Default: false
```
<!-- action-docs-usage source="integration-test/action.yaml" -->
<!-- action-docs-usage source="action.yaml" -->

## Usage

Expand Down
18 changes: 9 additions & 9 deletions lint/README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# GitHub Action Lint

<!-- prettier-ignore-start -->
<!-- action-docs-description source="lint/action.yaml" -->
<!-- action-docs-description source="action.yaml" -->
## Description

GitHub Action that lints a Terraform based repository via [action-pre-commit](https://github.com/open-turo/action-pre-commit)
<!-- action-docs-description source="lint/action.yaml" -->
<!-- action-docs-description source="action.yaml" -->
## Description

GitHub Action that lints a Terraform based repository via [action-pre-commit](https://github.com/open-turo/action-pre-commit)
<!-- action-docs-description -->
<!-- prettier-ignore-end -->

<!-- prettier-ignore-start -->
<!-- action-docs-inputs source="lint/action.yaml" -->
<!-- action-docs-inputs source="action.yaml" -->
## Inputs

| name | description | required | default |
| --- | --- | --- | --- |
| `checkout-repo` | <p>Perform checkout as first step of action</p> | `false` | `true` |
| `github-token` | <p>GitHub token that can checkout the consumer repository. e.g. 'secrets.GITHUB_TOKEN'</p> | `true` | `""` |
<!-- action-docs-inputs source="lint/action.yaml" -->
<!-- action-docs-inputs source="action.yaml" -->
## Inputs

| parameter | description | required | default |
Expand All @@ -29,22 +29,22 @@ GitHub Action that lints a Terraform based repository via [action-pre-commit](ht
| github-token | GitHub token that can checkout the consumer repository. e.g. 'secrets.GITHUB_TOKEN' | `true` | |
<!-- action-docs-inputs -->

<!-- action-docs-outputs source="lint/action.yaml" -->
<!-- action-docs-outputs source="action.yaml" -->

<!-- action-docs-outputs source="lint/action.yaml" -->
<!-- action-docs-outputs source="action.yaml" -->

<!-- action-docs-outputs -->

<!-- action-docs-runs source="lint/action.yaml" -->
<!-- action-docs-runs source="action.yaml" -->
## Runs

This action is a `composite` action.
<!-- action-docs-runs source="lint/action.yaml" -->
<!-- action-docs-runs source="action.yaml" -->
## Runs

This action is a `composite` action.
<!-- action-docs-runs -->

<!-- action-docs-usage source="lint/action.yaml" -->
<!-- action-docs-usage source="action.yaml" -->
<!-- action-docs-usage -->
<!-- prettier-ignore-end -->
6 changes: 3 additions & 3 deletions lint/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ runs:
# Provide opportunity to install terraform, golang, and others
uses: open-turo/action-setup-tools@v2
- name: Authorize
uses: open-turo/action-git-auth@v2
uses: open-turo/action-git-auth@v3
with:
github-personal-access-token: ${{ inputs.github-token }}
- name: Pre-commit
uses: open-turo/action-pre-commit@v2
uses: open-turo/action-pre-commit@v3
- name: Check release notes on pull_request
if: github.event_name == 'pull_request'
uses: open-turo/actions-release/lint-release-notes@v4
uses: open-turo/actions-release/lint-release-notes@v5
23 changes: 12 additions & 11 deletions prerelease/README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,43 @@
# GitHub Action Pre-release

<!-- prettier-ignore-start -->
<!-- action-docs-description source="prerelease/action.yaml" -->
<!-- action-docs-description source="action.yaml" -->
## Description

GitHub Action that produces a new pre-release (snapshot) of a golang based repository.
<!-- action-docs-description source="prerelease/action.yaml" -->
<!-- action-docs-description source="action.yaml" -->
<!-- prettier-ignore-end -->

<!-- prettier-ignore-start -->
<!-- action-docs-inputs source="prerelease/action.yaml" -->
<!-- action-docs-inputs source="action.yaml" -->
## Inputs

| name | description | required | default |
| --- | --- | --- | --- |
| `checkout-repo` | <p>Perform checkout as first step of action</p> | `false` | `true` |
| `checkout-fetch-depth` | <p>The number of commits to fetch. 0 indicates all history for all branches and tags</p> | `false` | `0` |
| `create-prerelease` | <p>Whether semantic-release should create a prerelease or do a dry run. This can be useful to set to true when a prerelease requires pushing artifacts semantic-release is in charge of generating</p> | `false` | `false` |
| `github-token` | <p>GitHub token that can checkout the consumer repository as well as create tags/releases against it. e.g. 'secrets.GITHUB_TOKEN'</p> | `true` | `""` |
| `go-version` | <p>Go version to use for building</p> | `true` | `1.17.3` |
| `push-docker-snapshot` | <p>If a docker snapshot image is generated, push it to the to the registry</p> | `false` | `false` |
| `docker-username` | <p>Docker username to push the snapshot image to the registry</p> | `false` | `""` |
| `docker-password` | <p>Docker password to push the snapshot image to the registry</p> | `false` | `""` |
<!-- action-docs-inputs source="prerelease/action.yaml" -->
| `docker-username` | <p>Docker username to push the prerelease image to the registry</p> | `false` | `""` |
| `docker-password` | <p>Docker password to push the prerelease image to the registry</p> | `false` | `""` |
| `extra-plugins` | <p>Extra plugins for pre-install. You can also specify specifying version range for the extra plugins if you prefer. Defaults to install @open-turo/semantic-release-config.</p> | `false` | `@open-turo/semantic-release-config ` |
<!-- action-docs-inputs source="action.yaml" -->

<!-- action-docs-outputs source="prerelease/action.yaml" -->
<!-- action-docs-outputs source="action.yaml" -->
## Outputs

| name | description |
| --- | --- |
| `version` | <p>Version of the project</p> |
<!-- action-docs-outputs source="prerelease/action.yaml" -->
<!-- action-docs-outputs source="action.yaml" -->
## Outputs

| parameter | description |
| --- | --- |
| version | Version of the project |
<!-- action-docs-outputs -->

<!-- action-docs-runs source="prerelease/action.yaml -->
<!-- action-docs-runs source="action.yaml -->
## Runs

This action is a `composite` action.
Expand Down
Loading
Loading