Skip to content

Commit

Permalink
fix: Remove dry run
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesiarmes committed Oct 9, 2024
1 parent f628a7b commit fe7890d
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 8 deletions.
41 changes: 39 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
find-modules:
name: Find updated modules
runs-on: ubuntu-latest
steps:
- name: Checkout source code
Expand Down Expand Up @@ -54,6 +55,7 @@ jobs:
modules: ${{ steps.modified.outputs.modules }}

lint:
name: Lint updated modules
runs-on: ubuntu-latest
needs: find-modules
steps:
Expand Down Expand Up @@ -93,7 +95,7 @@ jobs:
exit $exit_code
trivy:
name: trivy
name: Run security scan
runs-on: ubuntu-latest
steps:
- name: Checkout source code
Expand All @@ -104,8 +106,43 @@ jobs:
scan-type: config
format: sarif
output: "trivy-results.sarif"

- name: Upload SARIF result
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: "trivy-results.sarif"

release:
name: Release updated modules
runs-on: ubuntu-latest
needs: find-modules
strategy:
matrix:
module: ${{fromJson(needs.find-modules.outputs.modules)}}
steps:
- name: Checkout source code
uses: actions/checkout@v4
- run: cp ${{ matrix.module }}/.cz.yaml .cz.yaml
- name: Bump version and create changelog
id: bump
uses: commitizen-tools/commitizen-action@master
with:
push: true
github_token: ${{ secrets.GITHUB_TOKEN }}
changelog_increment_filename: release.md
- name: Get the module name
id: module_name
run: |
MODULE_PATH="${{ matrix.module }}"
MODULE_NAME="${MODULE_PATH//\//_}"
echo "name=${MODULE_NAME}" >> $GITHUB_OUTPUT
- run: echo '${{ steps.module_name.outputs.name }}'
- name: Bundle the module
run: tar czf "${{ steps.module_name.outputs.name }}-${{ steps.bump.outputs.version }}.tar.gz" ${{ matrix.module }}
- name: Create release
uses: softprops/action-gh-release@v2
with:
body_path: release.md
tag_name: ${{ steps.module_name.outputs.name }}-${{ steps.bump.outputs.version }}
files: |
release.md
${{ steps.module_name.outputs.name }}-${{ steps.bump.outputs.version }}.tar.gz
1 change: 0 additions & 1 deletion .github/workflows/release-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ jobs:
with:
push: true
github_token: ${{ secrets.GITHUB_TOKEN }}
dry_run: true
changelog_increment_filename: release.md
- name: Get the module name
id: module_name
Expand Down
8 changes: 3 additions & 5 deletions aptible/managed_endpoint/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog][changelog], and this project adheres
to [Semantic Versioning][semver].
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

Initial release of the Aptible Managed Endpoint module.

[changelog]: https://keepachangelog.com/en/1.1.0/
[semver]: https://semver.org/spec/v2.0.0.html

0 comments on commit fe7890d

Please sign in to comment.