Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 24 additions & 9 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ jobs:
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
args: --severity-threshold=high
args: --severity-threshold=high
sast-dockerfile-trivy-hadolint:
runs-on: ubuntu-latest
needs: build
Expand Down Expand Up @@ -134,6 +134,20 @@ jobs:
- sast-code-snyk
- sast-dockerfile-trivy-hadolint
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: fetch-tags
run: git fetch --tags origin
shell: bash
- id: bump-version
uses: armakuni/github-actions/bump-version@main
- name: check-bump-version-output
run: |
echo "version-was-bump: ${{ steps.bump-version.outputs.version-was-bump }}"
echo "previous-version: ${{ steps.bump-version.outputs.previous-version }}"
echo "current-version: ${{ steps.bump-version.outputs.current-version }}"
shell: bash
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
Expand All @@ -145,24 +159,25 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: |
abhisheksr01/companieshouse
images: abhisheksr01/companieshouse
context: git
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{version}},prefix=v,value=${{ steps.bump-version.outputs.current-version }}
labels: |
"org.opencontainers.image.title": "abhisheksr01/companieshouse",
"org.opencontainers.image.description": "Best practices and integrations available for Spring Boot based Microservice in a single repository with companieshouse API use case.",
"org.opencontainers.image.url": "https://github.com/abhisheksr01/spring-boot-microservice-best-practices",
"org.opencontainers.image.source": "https://github.com/abhisheksr01/spring-boot-microservice-best-practices",
"org.opencontainers.image.version": "0.1.0",
"org.opencontainers.image.version": ${{ steps.bump-version.outputs.current-version }},
"org.opencontainers.image.created": "2020-01-10T00:30:00.000Z",
"org.opencontainers.image.revision": ${{ github.sha }},
"org.opencontainers.image.licenses": "MIT"
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: abhisheksr01/companieshouse:latest
push: ${{ github.event_name != 'pull_request' }} # Only push on main branch
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
sbom: true
provenance: true
2 changes: 1 addition & 1 deletion cog.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from_latest_tag = true
ignore_merge_commits = false
ignore_merge_commits = true
tag_prefix = "v" # This is important to enable latest tag check with you use v prefix
#disable_changelog = false
#disable_bump_commit = false
Expand Down
Loading