Skip to content

Commit

Permalink
Add release please version block in all releasable actions
Browse files Browse the repository at this point in the history
  • Loading branch information
dsotirakis committed Nov 28, 2024
1 parent 563fea6 commit 98c3809
Show file tree
Hide file tree
Showing 12 changed files with 76 additions and 28 deletions.
6 changes: 5 additions & 1 deletion actions/aws-auth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ This is a composite GitHub Action used to authenticate and access resources in A

Example usage in a repository:

<!-- x-release-please-start-version -->

```yaml
name: Authenticate to AWS
on:
Expand All @@ -18,7 +20,7 @@ jobs:

steps:
- id: aws-auth
uses: grafana/shared-workflows/actions/aws-auth@main
uses: grafana/shared-workflows/actions/aws-auth@argo-lint-v1.0.0
with:
aws-region: "us-west-1"
role-arn: "arn:aws:iam::366620023056:role/github-actions/s3-test-access"
Expand All @@ -31,6 +33,8 @@ jobs:
cat 'test.txt'
```
<!-- x-release-please-end-version -->
## Inputs
<!-- markdownlint-disable no-space-in-code -->
Expand Down
6 changes: 5 additions & 1 deletion actions/build-push-to-dockerhub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ It uses `get-vault-secrets` action to get the DockerHub username and password fr

Example of how to use this action in a repository:

<!-- x-release-please-start-version -->

```yaml
name: Push to DockerHub
on:
Expand All @@ -23,7 +25,7 @@ jobs:
uses: actions/checkout@v4

- id: push-to-dockerhub
uses: grafana/shared-workflows/actions/build-push-to-dockerhub@main
uses: grafana/shared-workflows/actions/build-push-to-dockerhub@build-push-to-dockerhub-v0.1.0
with:
repository: ${{ github.repository }} # or any other dockerhub repository
context: .
Expand All @@ -32,6 +34,8 @@ jobs:
"latest"
```
<!-- x-release-please-end-version -->
## Inputs
| Name | Type | Description |
Expand Down
6 changes: 5 additions & 1 deletion actions/dockerhub-login/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ It uses `get-vault-secrets` action to get the DockerHub username and password fr

Example of how to use this action in a repository:

<!-- x-release-please-start-version -->

```yaml
name: Push to DockerHub
on:
Expand All @@ -20,7 +22,9 @@ jobs:

steps:
- name: Login to DockerHub
uses: grafana/shared-workflows/actions/dockerhub-login@main
uses: grafana/shared-workflows/actions/dockerhub-login@dockerhub-login-v1.0.0
- name: Build and push
run: make build && make push
```
<!-- x-release-please-end-version -->
6 changes: 5 additions & 1 deletion actions/generate-openapi-clients/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ _Note: For now, it only generates Go code. But it's structured in a way that any

## Example workflow

<!-- x-release-please-start-version -->

```yaml
name: Generate Clients

Expand All @@ -38,13 +40,15 @@ jobs:
with:
go-version: 1.18
- name: Generate clients
uses: grafana/shared-workflows/actions/generate-openapi-clients@main
uses: grafana/shared-workflows/actions/generate-openapi-clients@generate-openapi-clients-v1.0.0
with:
package-name: slo
spec-path: openapi.yaml
modify-spec-script: .github/workflows/modify-spec.sh # Optional, see "Spec Modifications" section
```
<!-- x-release-please-end-version -->
### Spec Modifications at Runtime
The `modify-spec-script` attribute is the path to an executable script that modifies the OpenAPI spec before generating the client.
Expand Down
6 changes: 5 additions & 1 deletion actions/get-vault-secrets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The secret format is defined here: <https://github.com/hashicorp/vault-action>

Example workflow:

<!-- x-release-please-start-version -->

```yaml
name: CI
on:
Expand All @@ -21,7 +23,7 @@ jobs:

steps:
- id: get-secrets
uses: grafana/shared-workflows/actions/get-vault-secrets@main
uses: grafana/shared-workflows/actions/get-vault-secrets@get-vault-secrets-v1.0.1
with:
# Secrets placed in the ci/common/<path> path in Vault
common_secrets: |
Expand All @@ -37,3 +39,5 @@ jobs:
echo "$ENVVAR1"
echo "${{ env.ENVVAR2 }}"
```
<!-- x-release-please-end-version -->
6 changes: 5 additions & 1 deletion actions/login-to-gar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ This is a composite GitHub Action, used to login to Google Artifact Registry (GA
It uses [OIDC authentication](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect)
which means that only workflows which get triggered based on certain rules can trigger these composite workflows.

<!-- x-release-please-start-version -->

```yaml
name: CI
on:
Expand All @@ -19,9 +21,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: grafana/shared-workflows/actions/login-to-gar@main
- uses: grafana/shared-workflows/actions/login-to-gar@login-to-gar-v0.1.0
id: login-to-gar
with:
registry: "<YOUR-GAR>" # e.g. us-docker.pkg.dev
environment: "prod" # can be either dev/prod
```
<!-- x-release-please-end-version -->
6 changes: 5 additions & 1 deletion actions/login-to-gcs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ It uses [OIDC authentication](https://docs.github.com/en/actions/deployment/secu
which means that only workflows which get triggered based on certain rules can
trigger these composite workflows.

<!-- x-release-please-start-version -->

```yaml
name: Login-to-gcs

Expand All @@ -21,10 +23,12 @@ jobs:
login-to-gcs:
name: login-to-gcs
steps:
- uses: grafana/shared-workflows/actions/login-to-gcs@main
- uses: grafana/shared-workflows/actions/login-to-gcs@login-to-gcs-v0.1.0
id: login-to-gcs
```
<!-- x-release-please-end-version -->
You can now use the shared-workflow `push-to-gcs` or gcloud to push objects from your CI pipeline.

Ex:
Expand Down
6 changes: 5 additions & 1 deletion actions/push-to-gar-docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ It uses [OIDC authentication](https://docs.github.com/en/actions/deployment/secu
which means that only workflows which get triggered based on certain rules can
trigger these composite workflows.

<!-- x-release-please-start-version -->

```yaml
name: CI
on:
Expand All @@ -24,7 +26,7 @@ jobs:
uses: actions/checkout@v4

- id: push-to-gar
uses: grafana/shared-workflows/actions/push-to-gar-docker@main
uses: grafana/shared-workflows/actions/push-to-gar-docker@push-to-gar-docker-v0.1.0
with:
registry: "<YOUR-GAR>" # e.g. us-docker.pkg.dev, optional
tags: |-
Expand All @@ -35,6 +37,8 @@ jobs:
environment: "dev" # can be either dev/prod
```
<!-- x-release-please-end-version -->
[Artifact Registry repositories can't contain underscores][underscore-issue].
As a convention, this action will replace any underscores in the repository name
with hyphens. That behaviour can be overridden using the `repository_name`
Expand Down
28 changes: 16 additions & 12 deletions actions/push-to-gcs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ It uses [OIDC authentication](https://docs.github.com/en/actions/deployment/secu
which means that only workflows which get triggered based on certain rules can
trigger these composite workflows.

<!-- x-release-please-start-version -->

```yaml
name: Upload Files to GCS

Expand All @@ -27,83 +29,85 @@ jobs:
id: login-to-gcs

# Upload a single file to the bucket root
- uses: grafana/shared-workflows/actions/push-to-gcs@main
- uses: grafana/shared-workflows/actions/push-to-gcs@push-to-gcs-v0.1.0
with:
bucket: ${{ steps.login-to-gcs.outputs.bucket }}
path: file.txt
environment: "dev" # Can be dev/prod (defaults to dev)

# Upload a single file and apply a predefined ACL. See `predefinedAcl` for options.
- uses: grafana/shared-workflows/actions/push-to-gcs@main
- uses: grafana/shared-workflows/actions/push-to-gcs@push-to-gcs-v0.1.0
with:
bucket: ${{ steps.login-to-gcs.outputs.bucket }}
path: file.txt
predefinedAcl: projectPrivate
environment: "dev"

# Here are 3 equivalent statements to upload a single file and its parent directory to the bucket root
- uses: grafana/shared-workflows/actions/push-to-gcs@main
- uses: grafana/shared-workflows/actions/push-to-gcs@push-to-gcs-v0.1.0
with:
bucket: ${{ steps.login-to-gcs.outputs.bucket }}
path: folder/file.txt
- uses: grafana/shared-workflows/actions/push-to-gcs@main
- uses: grafana/shared-workflows/actions/push-to-gcs@push-to-gcs-v0.1.0
with:
bucket: ${{ steps.login-to-gcs.outputs.bucket }}
path: .
glob: "folder/file.txt"
- uses: grafana/shared-workflows/actions/push-to-gcs@main
- uses: grafana/shared-workflows/actions/push-to-gcs@push-to-gcs-v0.1.0
with:
bucket: ${{ steps.login-to-gcs.outputs.bucket }}
path: folder
glob: "file.txt"

# Here are 2 equivalent statements to upload a single file WITHOUT its parent directory to the bucket root
- uses: grafana/shared-workflows/actions/push-to-gcs@main
- uses: grafana/shared-workflows/actions/push-to-gcs@push-to-gcs-v0.1.0
with:
bucket: ${{ steps.login-to-gcs.outputs.bucket }}
path: folder/file.txt
parent: false
- uses: grafana/shared-workflows/actions/push-to-gcs@main
- uses: grafana/shared-workflows/actions/push-to-gcs@push-to-gcs-v0.1.0
with:
bucket: ${{ steps.login-to-gcs.outputs.bucket }}
path: folder
glob: "file.txt"
parent: false

# Here are 2 equivalent statements to upload a directory with all subdirectories
- uses: grafana/shared-workflows/actions/push-to-gcs@main
- uses: grafana/shared-workflows/actions/push-to-gcs@push-to-gcs-v0.1.0
with:
bucket: ${{ steps.login-to-gcs.outputs.bucket }}
path: folder/
- uses: grafana/shared-workflows/actions/push-to-gcs@main
- uses: grafana/shared-workflows/actions/push-to-gcs@push-to-gcs-v0.1.0
with:
bucket: ${{ steps.login-to-gcs.outputs.bucket }}
path: .
glob: "folder/**/*"

# Specify a bucket prefix with `bucket_path`
- uses: grafana/shared-workflows/actions/push-to-gcs@main
- uses: grafana/shared-workflows/actions/push-to-gcs@push-to-gcs-v0.1.0
name: upload-yaml-to-some-path
with:
bucket: ${{ steps.login-to-gcs.outputs.bucket }}
path: file.txt
bucket_path: some-path/

# Upload all files of a type
- uses: grafana/shared-workflows/actions/push-to-gcs@main
- uses: grafana/shared-workflows/actions/push-to-gcs@push-to-gcs-v0.1.0
with:
bucket: ${{ steps.login-to-gcs.outputs.bucket }}
path: folder/
glob: "*.txt"

# upload all files of a type recursively
- uses: grafana/shared-workflows/actions/push-to-gcs@main
- uses: grafana/shared-workflows/actions/push-to-gcs@push-to-gcs-v0.1.0
with:
bucket: ${{ steps.login-to-gcs.outputs.bucket }}
path: folder/
glob: "**/*.txt"
```
<!-- x-release-please-end-version -->
## Inputs
| Name | Type | Description |
Expand Down
16 changes: 10 additions & 6 deletions actions/send-slack-message/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ You do not need to set up Slack webhooks in order to use this action.

See the docs for the [slackapi/slack-github-action workflow](https://github.com/slackapi/slack-github-action/blob/main/README.md#technique-2-slack-app) for more info. Our installation is via Slack App.

<!-- x-release-please-start-version -->

```yaml
name: Send And Update a Slack plain text message
jobs:
Expand All @@ -13,13 +15,13 @@ jobs:
steps:
- name: Send Slack Message
id: slack
uses: grafana/shared-workflows/actions/send-slack-message@main
uses: grafana/shared-workflows/actions/send-slack-message@send-slack-message-v1.0.0
with:
channel-id: "Channel Name or ID"
slack-message: "We are testing, testing, testing all day long"

- name: Update Slack Message
uses: grafana/shared-workflows/actions/send-slack-message@main
uses: grafana/shared-workflows/actions/send-slack-message@send-slack-message-v1.0.0
with:
channel-id: ${{ steps.slack.outputs.channel_id }} # Channel ID is required when updating a message
slack-message: "This is the updated message"
Expand All @@ -34,7 +36,7 @@ jobs:
steps:
- name: Send Slack Message via Payload
id: slack
uses: grafana/shared-workflows/actions/send-slack-message@main
uses: grafana/shared-workflows/actions/send-slack-message@send-slack-message-v1.0.0
with:
channel-id: "Channel Name or ID"
payload: |
Expand All @@ -56,7 +58,7 @@ jobs:
}
- name: Update Slack Message via Payload
uses: grafana/shared-workflows/actions/send-slack-message@main
uses: grafana/shared-workflows/actions/send-slack-message@send-slack-message-v1.0.0
with:
channel-id: ${{ steps.slack.outputs.channel_id }}
payload: |
Expand Down Expand Up @@ -88,15 +90,15 @@ jobs:
steps:
- name: Post to a Slack channel
id: slack
uses: grafana/shared-workflows/actions/send-slack-message@main
uses: grafana/shared-workflows/actions/send-slack-message@send-slack-message-v1.0.0
with:
channel-id: "Channel Name or ID"
payload: |
{
"text": "Deployment started (In Progress)"
}
- name: Respond to Slack Message
uses: grafana/shared-workflows/actions/send-slack-message@main
uses: grafana/shared-workflows/actions/send-slack-message@send-slack-message-v1.0.0
with:
channel-id: ${{ steps.slack.outputs.channel_id }}
payload: |
Expand All @@ -106,6 +108,8 @@ jobs:
}
```
<!-- x-release-please-end-version -->
## Inputs
| Name | Type | Description |
Expand Down
6 changes: 5 additions & 1 deletion actions/setup-argo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ Setup Argo cli and add it to the PATH, this action will pull the binary from Git

## Example

<!-- x-release-please-start-version -->

```
uses: grafana/shared-workflows/actions/setup-argo@main
uses: grafana/shared-workflows/actions/setup-argo@setup-argo-v1.0.0
with:
version: 3.5.1 # Version of the Argo CLI to install.
```

<!-- x-release-please-end-version -->
Loading

0 comments on commit 98c3809

Please sign in to comment.