Skip to content

Commit

Permalink
Merge branch 'main' into update-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
codatoz committed Nov 5, 2024
2 parents 7e358b9 + 5a6fc62 commit 789e639
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 11 deletions.
77 changes: 77 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Enable dependabot, a tool to automatically propose dependency updates

# Copyright the Linux Foundation and the CII Best Practices badge contributors
# SPDX-License-Identifier: MIT

# It's possible to enable dependabot via just GitHub project settings,
# and we did that for a while. However, when a project does that,
# it's harder for others (such as OpenSSF Scorecard) to realize or verify
# that the project has dependabot enabled. Creating this dependabot.yml
# file makes easier to *verify* that automatic dependency update proposals
# are happening. This also gives finer-grained control.

# For more information, see:
# https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates

version: 2
updates:
# Keep our GitHub actions up to date.
- package-ecosystem: "github-actions"
target-branch: "main"
directory: "/"
schedule:
interval: "weekly"
labels:
- "github"
- "dependencies"
pull-request-branch-name:
# Separate sections of the branch name with a hyphen
# for example, `dependabot-npm_and_yarn-next_js-acorn-6.4.1`
separator: "-"
reviewers:
- "@raito-io/back-end"
groups:
combined:
# Define patterns to include dependencies in the group (based on dependency name)
patterns:
- "*"
# Maintain dependencies for npm
- package-ecosystem: "gomod"
target-branch: "main"
directory: "/"
schedule:
interval: "weekly"
labels:
- "gomod"
- "dependencies"
pull-request-branch-name:
# Separate sections of the branch name with a hyphen
# for example, `dependabot-npm_and_yarn-next_js-acorn-6.4.1`
separator: "-"
reviewers:
- "@raito-io/back-end"
groups:
combined:
# Define patterns to include dependencies in the group (based on dependency name)
patterns:
- "*"
# Maintain dependencies for terraform
- package-ecosystem: "terraform"
target-branch: "main"
directory: "/.infra"
schedule:
interval: "weekly"
labels:
- "terraform"
- "dependencies"
pull-request-branch-name:
# Separate sections of the branch name with a hyphen
# for example, `dependabot-npm_and_yarn-next_js-acorn-6.4.1`
separator: "-"
reviewers:
- "@raito-io/back-end"
groups:
combined:
# Define patterns to include dependencies in the group (based on dependency name)
patterns:
- "*"
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
cache-dependency-path: "go.sum"
Expand All @@ -33,14 +33,14 @@ jobs:
run: make build

- name: Lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v6
with:
version: v1.61.0

- name: Test
run: make test-coverage

- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./unit-test-coverage.txt
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
check-latest: true
Expand All @@ -31,11 +31,11 @@ jobs:
run: git config --global url."https://${{secrets.CI_SECRETS_TOKEN_USER}}:${{secrets.CI_SECRETS_TOKEN}}@github.com".insteadOf "https://github.com"

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
args: release --rm-dist
args: release --clean
env:
GORELEASER_CURRENT_TAG: ${{github.ref_name}}
GITHUB_TOKEN: ${{ secrets.CI_SECRETS_TOKEN }}
2 changes: 2 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
version: 2

# Make sure to check the documentation at https://goreleaser.com
project_name: cli-plugin-aws-organization
before:
Expand Down
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
</h4>

<p align="center">
<a href="/LICENSE.md" target="_blank"><img src="https://img.shields.io/badge/license-Apache%202-brightgreen.svg" alt="Software License" /></a>
<a href="https://github.com/raito-io/cli-plugin-aws-organization/actions/workflows/build.yml" target="_blank"><img src="https://github.com/raito-io/cli-plugin-aws-organization/actions/workflows/build.yml/badge.svg" alt="Build status"/></a>
<!--a href="https://codecov.io/gh/raito-io/cli-plugin-aws-organization" target="_blank"><img src="https://img.shields.io/codecov/c/github/raito-io/cli-plugin-aws-organization" alt="Code Coverage" /></a-->
<a href="/LICENSE.md" target="_blank"><img src="https://img.shields.io/badge/license-Apache%202-brightgreen.svg?label=License" alt="Software License" /></a>
<img src="https://img.shields.io/github/v/release/raito-io/cli-plugin-aws-organization?sort=semver&label=Release&color=651FFF" />
<a href="https://github.com/raito-io/cli-plugin-aws-organization/actions/workflows/build.yml" target="_blank"><img src="https://img.shields.io/github/actions/workflow/status/raito-io/cli-plugin-aws-organization/build.yml?branch=main" alt="Build status" /></a>
<a href="https://codecov.io/gh/raito-io/cli-plugin-aws-organization" target="_blank"><img src="https://img.shields.io/codecov/c/github/raito-io/cli-plugin-aws-organization?label=Coverage" alt="Code Coverage" /></a>
<a href="https://golang.org/"><img src="https://img.shields.io/github/go-mod/go-version/raito-io/cli-plugin-aws-organization?color=7fd5ea" /></a>
</p>

<hr/>
Expand Down Expand Up @@ -68,3 +70,11 @@ $> raito run
This will take the configuration from the `raito.yml` file (in the current working directory) and start a single synchronization.

Note: if you have multiple targets configured in your configuration file, you can run only this target by adding `--only-targets aws-account` at the end of the command.

## Authentication
To authenticate the AWS plugin, the AWS default provider chain will be used:
1. Environment variables: The environment variables `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, and `AWS_SESSION_TOKEN` are used.
2. Shared credentials file. Credentials defined on `~/.aws/credentials` will be used. A profile can be defined with `aws-region`.
3. If running on an Amazon EC2 instance, IAM role for Amazon EC2.

More information can be found on the [AWS SDK documentation](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials).

0 comments on commit 789e639

Please sign in to comment.