Skip to content
This repository has been archived by the owner on Oct 6, 2024. It is now read-only.

Commit

Permalink
ci: revert
Browse files Browse the repository at this point in the history
  • Loading branch information
jlec committed Jan 9, 2024
1 parent ad6fcce commit 56eaef9
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 4 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
name: Continuous Delivery

# yamllint disable-line rule:truthy
on:
# yamllint disable-line rule:empty-values
workflow_dispatch:

push:
branches:
- main

permissions: read-all

jobs:
goreleaser:
name: "GO Releaser"
if: >-
startsWith(github.event.head_commit.message, 'bump:')
uses: jlec/github-actions/.github/workflows/reusable-cd-go.yml@main
permissions:
contents: write
statuses: write
secrets:
pat: ${{ secrets.PAT_GITHUB_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
tfe_release_token: ${{ secrets.TFE_RELEASE_KEY }}
gpg_release_key: ${{ secrets.GPG_RELEASE_KEY }}
release-and-clean:
name: Release the code & clean up
if: >-
startsWith(github.event.head_commit.message, 'bump:')
runs-on: ubuntu-latest
permissions:
contents: write
statuses: write
needs:
- goreleaser
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref_name }}
- name: Cleanup action status
uses: ouzi-dev/commit-status-updater@v2
with:
status: "success"
token: ${{ secrets.GITHUB_TOKEN }}
name: "GithubActions - ${GITHUB_WORKFLOW}"
ignoreForks: true
7 changes: 3 additions & 4 deletions .github/workflows/ci.yaml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@ jobs:
name: "Run Linting against all files"
uses: jlec/github-actions/.github/workflows/reusable-linting.yml@main
secrets:
github-token: ${{ secrets.PAT_GITHUB_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
go-build-test:
name: "GO Build & Test"
# trunk-ignore(actionlint/if-cond)
if: >-
${{ github.actor != 'dependabot[bot]' }} &&
!startsWith(github.event.head_commit.message, 'bump:') &&
Expand Down Expand Up @@ -68,7 +67,7 @@ jobs:
!startsWith(github.event.head_commit.message, 'bump:') &&
!startsWith(github.event.head_commit.message, 'WIP')
needs:
# - go-build-test
- go-build-test
- dependabot
- linting
uses: jlec/github-actions/.github/workflows/reusable-ci-generic.yml@main
Expand All @@ -77,7 +76,7 @@ jobs:
pull-requests: write
secrets:
pat: ${{ secrets.PAT_GITHUB_TOKEN }}
github-token: ${{ secrets.PAT_GITHUB_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}

ci-release:
name: "Run Release CI"
Expand Down

0 comments on commit 56eaef9

Please sign in to comment.