feat: super cool

This commit is contained in:
Aleksandr Chikovani 2023-08-27 21:00:11 -04:00
parent 2a7dbda73e
commit f6dda5c99a
2 changed files with 72 additions and 32 deletions

View file

@ -1,4 +1,4 @@
name: Publish docker image
name: Release version
on:
push:
@ -18,33 +18,51 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3
- uses: docker://ghcr.io/codfish/semantic-release-action@sha256:4675eae74abbabc869298ca798833fef291ce30fb9edfac76787746e7d9d3904
- name: Codestyle
id: semantic
with:
branches: |
[
'release-*',
{
name: 'development',
prerelease: true
}
]
additional_packages: |
[
"@semantic-release/changelog",
"@semantic-release/git"
]
plugins: |
[
"@semantic-release/commit-analyzer",
"@semantic-release/changelog",
"@semantic-release/git",
"@semantic-release/github",
"@semantic-release/release-notes-generator"
]
dry_run: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Get the current branch name
CURRENT_BRANCH=$(git symbolic-ref -q HEAD)
CURRENT_BRANCH=${CURRENT_BRANCH##refs/heads/}
CURRENT_BRANCH=${CURRENT_BRANCH:-HEAD}
echo "Current branch: $CURRENT_BRANCH"
# Get a list of all tags in the repository
git fetch --prune --unshallow --tags
TAG_LIST=$(git tag)
echo "Available tags: $TAG_LIST"
# Get the messages of the last three commits on the current branch
COMMIT_MESSAGES=$(git log --pretty=format:%s -n 1)
echo "Last commit message:"
echo "$COMMIT_MESSAGES"
#- uses: docker://ghcr.io/codfish/semantic-release-action@sha256:4675eae74abbabc869298ca798833fef291ce30fb9edfac76787746e7d9d3904
# id: semantic
# with:
# branches: |
# [
# 'release-*',
# {
# name: 'development',
# prerelease: true
# }
# ]
# additional_packages: |
# [
# "@semantic-release/changelog",
# "@semantic-release/git"
# ]
# plugins: |
# [
# "@semantic-release/commit-analyzer",
# "@semantic-release/changelog",
# "@semantic-release/git",
# "@semantic-release/github",
# "@semantic-release/release-notes-generator"
# ]
# dry_run: false
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#- name: Login to GitHub Container Registry
# uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc
@ -74,6 +92,3 @@ jobs:
# #TODO: force_push_tag is true for debug purpose only
# force_push_tag: true
outputs:
version: ${{ steps.semantic.outputs.release-version }}

View file

@ -8,7 +8,17 @@ env:
IMAGE_NAME: ${{ github.repository }}
jobs:
java_build:
style_checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: PR title check
run: echo "NIY"
- name: Codestyle
run: echo "NIY"
code_checks:
runs-on: ubuntu-latest
steps:
@ -28,10 +38,25 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Build Docker image
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825
with:
context: .
push: false
tags: ghcr.io/${{ env.IMAGE_NAME }}:test
ort:
runs-on: ubuntu-latest
steps:
- name: Use HTTPS instead of SSH for Git cloning
run: git config --global url.https://github.com/.insteadOf ssh://git@github.com/
- name: Checkout project
uses: actions/checkout@v3
with:
repository: 'jshttp/mime-types'
- name: Run GitHub Action for ORT
uses: oss-review-toolkit/ort-ci-github-action@v1
with:
allow-dynamic-versions: 'true'
fail-on: 'violations'