Skip to content

build(deps): bump goreleaser/goreleaser-action from 4.6.0 to 6.1.0 #299

build(deps): bump goreleaser/goreleaser-action from 4.6.0 to 6.1.0

build(deps): bump goreleaser/goreleaser-action from 4.6.0 to 6.1.0 #299

Workflow file for this run

# This GitHub action runs your tests for each commit push and/or PR. Optionally
# you can turn it on using a cron schedule for regular testing.
#
name: Tests
on:
pull_request:
paths:
- "**.go"
- "go.mod"
- "go.sum"
- ".github/workflows/*.yml"
- ".github/workflows/*.yaml"
- ".golangci.yaml"
# For systems with an upstream API that could drift unexpectedly (like most SaaS systems, etc.),
# we recommend testing at a regular interval not necessarily tied to code changes. This will
# ensure you are alerted to something breaking due to an API change, even if the code did not
# change.
# schedule:
# - cron: '0 13 * * *'
permissions:
pull-requests: write
contents: write
jobs:
# ensure the code builds...
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.19
id: go
- name: Check out terraform-provider-loft
uses: actions/[email protected]
- name: Get dependencies
run: |
go mod download
- name: Build
run: |
go build -v .
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v4
with:
go-version: 1.19
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
args: -v --max-same-issues=50 --timeout=5m
# Ensure docs were generated
generate:
name: Generate
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.19
- name: Check out terraform-provider-loft
uses: actions/[email protected]
- name: Generate docs
run: go generate ./...
- name: Check that docs were already generated
run: |
git diff --compact-summary --exit-code || \
(echo; echo "Unexpected difference in directories after code generation. Run 'go generate ./...' command and commit."; exit 1)
# Run Acceptance Tests
test:
name: Acceptance Test
needs: build
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
# list whatever Terraform versions here you would like to support
terraform:
- '1.0.*'
- '1.1.*'
- '1.2.*'
- '1.3.*'
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.19
id: go
- name: Set up Devspace
uses: loft-sh/setup-devspace@main
- name: Set up Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: ${{ matrix.terraform }}
terraform_wrapper: false
- name: Check out terraform-provider-loft
uses: actions/[email protected]
- name: Get Dependencies
run: |
go mod download
- name: Create KinD Cluster
uses: engineerd/[email protected]
with:
version: "v0.13.0"
image: kindest/node:v1.24.0@sha256:406fd86d48eaf4c04c7280cd1d2ca1d61e7d0d61ddef0125cb097bc7b82ed6a1
- name: TF acceptance tests
timeout-minutes: 12
run: |
devspace use namespace loft
devspace run e2e
# Auto Approve passing Dependabot Patch & Minor PRs
auto-approve-dependabot:
name: Auto-merge Dependabot PRs
runs-on: ubuntu-latest
needs: [build, lint, generate, test]
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/[email protected]
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Approve the PR
if : ${{ steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor' }}
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Auto-merge the PR
if : ${{ steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor' }}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}