Skip to content

Commit

Permalink
Merge pull request #7 from johnricords/updatedWorkflows
Browse files Browse the repository at this point in the history
updated the workflow callers
  • Loading branch information
johnricords authored Jan 30, 2023
2 parents 7264a4b + 98c9103 commit 88447d9
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 76 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.0.0
current_version = 1.1.0
commit = True
message = Bumps version to {new_version}
tag = False
Expand Down
20 changes: 2 additions & 18 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,11 @@
name: Run lint and static analyis checks
on:
pull_request:
workflow_call:

concurrency:
group: lint-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
tardigradelint:
runs-on: ubuntu-latest
steps:
- name: Clone this git repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c

- name: Project Syntax Verification
run: make docker/run target=lint

actionlint:
runs-on: ubuntu-latest
steps:
- name: Clone this git repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c

- name: Check workflow files
uses: reviewdog/action-actionlint@b6feb003955cad286985c42e7047f4567a798f3f
lint:
uses: plus3it/actions-workflows/.github/workflows/lint.yml@41056300ba78d8be98b45f057aea246f8c4f30cf
42 changes: 3 additions & 39 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,43 +12,7 @@ on:
- .bumpversion.cfg

jobs:
lint:
uses: ./.github/workflows/lint.yml

test:
uses: ./.github/workflows/test.yml

release:
needs:
- lint
- test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
with:
fetch-depth: 0
- run: git fetch --tags --force origin # WA: https://github.com/actions/checkout/issues/882

- name: Test release condition
id: release
run: |
set -eu -o pipefail
RELEASE=false
PRIOR_VERSION=$(git describe --abbrev=0 --tags || true)
RELEASE_VERSION=$(grep current_version .bumpversion.cfg | sed 's/^.*= //' )
if [[ "$PRIOR_VERSION" != "$RELEASE_VERSION" ]]; then RELEASE=true; fi
echo "condition=${RELEASE}"
echo "version=${RELEASE_VERSION}"
echo "condition=${RELEASE}" >> "$GITHUB_OUTPUT"
echo "version=${RELEASE_VERSION}" >> "$GITHUB_OUTPUT"
- name: Create release
if: steps.release.outputs.condition == 'true'
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
with:
name: ${{ steps.release.outputs.version }}
tag_name: ${{ steps.release.outputs.version }}
generate_release_notes: true
target_commitish: ${{ env.GITHUB_REF }}
token: ${{ secrets.GH_RELEASES_TOKEN }}
uses: plus3it/actions-workflows/.github/workflows/release.yml@41056300ba78d8be98b45f057aea246f8c4f30cf
secrets:
release-token: ${{ secrets.GH_RELEASES_TOKEN }}
20 changes: 2 additions & 18 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,11 @@
name: Run test jobs
on:
pull_request:
workflow_call:

concurrency:
group: test-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
mockstacktest:
runs-on: ubuntu-latest
steps:
- name: Clone this git repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c

- name: Install docker-compose
run: make docker-compose/install

- name: Start the mock AWS stack
run: make mockstack/up

- name: Apply Terraform test configs in mock AWS stack
run: make mockstack/pytest

- name: Cleanup the mock AWS stack
run: make mockstack/clean
test:
uses: plus3it/actions-workflows/.github/workflows/test.yml@41056300ba78d8be98b45f057aea246f8c4f30cf
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

### 1.1.0

**Commit Delta**: N/A

**Released**: 2023.01.27

**Summary**:

* Updated workflow files to be consumable and reusable, and now points to actions-workflows repo

### 1.0.0

**Commit Delta**: N/A
Expand Down

0 comments on commit 88447d9

Please sign in to comment.