Skip to content

Commit

Permalink
Merge branch 'main' into ENG-867
Browse files Browse the repository at this point in the history
  • Loading branch information
triwats committed Sep 2, 2024
2 parents a212bf0 + ef99f01 commit afbe42e
Show file tree
Hide file tree
Showing 6 changed files with 6,557 additions and 557 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Create a semantic release, including
# - a package.json version number
# - an updated change log file
# - a Github release, which will trigger a deployment
name: Create Github Release

# All changes to `main` have gone through
# automated checks and should have gone
# through code review and manual checks
# where appropriate.
on:
push:
branches:
- main
# This stops us getting into an infinite loop when a release commit
# is created on `main` containing the changes to CHANGE_LOG.md .
# The loop could happen because we use credentials from the machine
# user so that a commit to the protected `main` branch is possible
# (default workflow credentials can't trigger further workflows via
# events, to avoid this exact situation).
paths-ignore:
- "CHANGE_LOG.md"
- "sonar-project.properties"
jobs:
semantic_release:
name: semantic release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# Need this to prevent the custom Github credentials on
# the semantic release step being overridden with the
# default ones.
persist-credentials: false

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "npm"

# Install.
- run: npm ci

# Create Github release using semantic-release package.
# See config here release.config.js
# Note, this runs on `main` and creates the release tag.
# and updates the changelog file.
- name: do release
id: semantic_release
run: npx semantic-release
env:
GH_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
# Don't run pre-commit or commit message hooks on this commit
HUSKY: 0

- name: Report to Slack on failure
if: ${{ steps.semantic_release.outcome == 'failure' }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_COLOR: ${{ job.status }} # or a specific color like 'green' or '#ff00ff'
SLACK_MESSAGE: "Semantic Release status: ${{ job.status }}"
SLACK_TITLE: Semantic Release
SLACK_USERNAME: SemanticReleaseReporter
SLACK_WEBHOOK: ${{ secrets.OAK_GITHUB_NOTIFICATION_WEBHOOK }}
20 changes: 20 additions & 0 deletions CHANGE_LOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 1.0.0 (2024-09-02)


### Bug Fixes

* **actions, docs:** Fixing action to be action - not workflow syntax, improving docs, removing versioning as this is done via setup ([53266c7](https://github.com/oaknational/oak-terraform-actions/commit/53266c7b5fa2981680b912ff0b991303e27d3ef3))
* **devex:** adding commit lint, new lint job ([54332eb](https://github.com/oaknational/oak-terraform-actions/commit/54332ebbc0b66ada9fc469c296604eeb492201f3))
* **devex:** fixing configuration for v9 ([48957dc](https://github.com/oaknational/oak-terraform-actions/commit/48957dceda39cc819e6529063da067dfc8d745b4))
* **devex:** fixing configuration for v9 ([0f098a3](https://github.com/oaknational/oak-terraform-actions/commit/0f098a3e38b6c5aa9ef8ff14a028257446828ab6))
* **devex:** fixing Husky configuration for v9 ([b532d1e](https://github.com/oaknational/oak-terraform-actions/commit/b532d1e4248e76b3f025f9c25e9838d4919ee16e))
* **devex:** testing commitlint ([9a8f387](https://github.com/oaknational/oak-terraform-actions/commit/9a8f38797cdc0c7e113c7b9879bba446fcf72733))
* **ENG-593:** Improving the linting in the action ([3c5675b](https://github.com/oaknational/oak-terraform-actions/commit/3c5675b44efa8672bdc4fd01f7604bdc4ef20c19))
* **ENG-884:** removing sonar from semantic release since irrelevant ([#11](https://github.com/oaknational/oak-terraform-actions/issues/11)) ([f82e246](https://github.com/oaknational/oak-terraform-actions/commit/f82e24685db378f1e399414d966109b5c5777268))
* **ENG-899:** adding a check to ensure that TFLint file exists for newer projects ([a56ebf5](https://github.com/oaknational/oak-terraform-actions/commit/a56ebf53bd4ad80e5b30f7ffa673b4fcdd02af9a))
* **ENG-899:** adding shell to tfaction ([47df0cd](https://github.com/oaknational/oak-terraform-actions/commit/47df0cd645c2b87abd5ca81438e463a10c6bc211))


### Features

* **ENG-872:** adding basic folder structure ([46d3d8e](https://github.com/oaknational/oak-terraform-actions/commit/46d3d8e4238c0749cf712ab44094c2b80fbf8f4b))
12 changes: 11 additions & 1 deletion actions/terraform-checks/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ runs:
with:
terraform_version: ${{ inputs.terraform_version }}

- name: Check for .tflint.hcl file
shell: bash
run: |
if [ -f .tflint.hcl ]; then
echo "INFO: .tflint.hcl file found in the root directory."
else
echo "ERROR: .tflint.hcl file is missing. Please add it to the root of the repository. See the internal terraform docs"
exit 1
fi
- name: Cache plugin dir
uses: actions/cache@v4
with:
Expand All @@ -25,7 +35,7 @@ runs:
- name: "Setup TFLint"
uses: terraform-linters/setup-tflint@v4
with:
tflint_version: v0.52.0
tflint_version: v0.53.0

- name: "Print version of tflint"
shell: bash
Expand Down
Loading

0 comments on commit afbe42e

Please sign in to comment.