Skip to content

Commit

Permalink
add missing workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Pantani authored and Pantani committed Mar 28, 2024
1 parent ede4632 commit cb0554c
Show file tree
Hide file tree
Showing 12 changed files with 102 additions and 13 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/auto-author-assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: auto-author-assign

on:
pull_request_target:
types: [ opened, reopened ]

permissions:
pull-requests: write

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
assign-author:
runs-on: ubuntu-latest
steps:
- uses: toshimaru/auto-author-assign@v1.6.2
19 changes: 19 additions & 0 deletions .github/workflows/cl-enforcer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Changelog Enforcer
on:
pull_request:
# The specific activity types are listed here to include "labeled" and "unlabeled"
# (which are not included by default for the "pull_request" trigger).
# This is needed to allow skipping enforcement of the changelog in PRs with specific labels,
# as defined in the (optional) "skipLabels" property.
types: [ opened, synchronize, reopened, ready_for_review, labeled, unlabeled ]

jobs:
changelog:
runs-on: ubuntu-latest
steps:
- uses: dangoslen/changelog-enforcer@v3
with:
changeLogPath: 'changelog.md'
missingUpdateErrorMessage: 'Please add an entry to the changelog.md file or add the "skip-changelog" label'
skipLabels: 'skip-changelog'
versionPattern: ''
29 changes: 29 additions & 0 deletions .github/workflows/go-formatting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Go formatting
on:
push:
branches: [ main ]
paths:
- '**.go'

jobs:
go-formatting:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '1.21'

- name: Run make format
run: make format

- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
title: "chore: go formatting"
commit-message: "chore: go formatting"
body: ""
branch: chore/go-formatting
16 changes: 16 additions & 0 deletions .github/workflows/janitor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Janitor
# Janitor cleans up previous runs that are not completed for a given workflow
# It cancels Sims and Tests
# Reference the API https://api.github.com/repos/:org/:repo/actions/workflows to find workflow ids
on:
pull_request:

jobs:
cancel:
name: "Cancel Previous Runs"
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
6 changes: 4 additions & 2 deletions .github/workflows/release-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release Binaries

on:
release:
types: [published]
types: [ published ]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -18,7 +18,9 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.22"
cache: true
cache-dependency-path: go.sum

- name: Checkout
uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release Docker Image

on:
release:
types: [published]
types: [ published ]
schedule:
- cron: "0 0 * * *" # every day at midnight

Expand Down Expand Up @@ -34,7 +34,7 @@ jobs:
name: Push Docker image to Docker Hub
if: needs.check-latest-run.outputs.last_sha != github.sha
runs-on: ubuntu-latest
needs: [consecutiveness, check-latest-run]
needs: [ consecutiveness, check-latest-run ]

steps:
- name: Check out the repo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-homebrew.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Publish Gex to HomeBrew

on:
release:
types: [published]
types: [ published ]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
release-nightly:
if: needs.check-latest-run.outputs.last_sha != github.sha
runs-on: ubuntu-latest
needs: [consecutiveness, check-latest-run]
needs: [ consecutiveness, check-latest-run ]
env:
working-directory: go/src/github.com/ignite/gex

Expand Down Expand Up @@ -64,12 +64,12 @@ jobs:
releases-binaries:
if: needs.check-latest-run.outputs.last_sha != github.sha
name: Release Go Binary
needs: [consecutiveness, check-latest-run]
needs: [ consecutiveness, check-latest-run ]
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, darwin]
goarch: [amd64, arm64]
goos: [ linux, darwin ]
goarch: [ amd64, arm64 ]
steps:
- uses: actions/checkout@v4
- uses: wangyoucao577/go-release-action@v1.43
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/release-snapcraft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Publish Gex to Snapcraft

on:
release:
types: [published]
types: [ published ]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -16,7 +16,9 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.22"
cache: true
cache-dependency-path: go.sum

- name: Checkout
uses: actions/checkout@v4
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ jobs:
if: env.GIT_DIFF
with:
go-version-file: go.mod
cache: false
cache: true
cache-dependency-path: go.sum

- uses: golangci/golangci-lint-action@v4
if: env.GIT_DIFF
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- uses: actions/setup-go@v5
if: env.GIT_DIFF
with:
go-version: '1.21'
go-version: "1.22"
cache: true
cache-dependency-path: go.sum

Expand Down
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

### Features

- [#1](https://github.com/ignite/gex/pull/1) Full refactor

### Changes

### Fixes
Expand Down

0 comments on commit cb0554c

Please sign in to comment.