Skip to content

[Snyk] Fix for 1 vulnerabilities #175

[Snyk] Fix for 1 vulnerabilities

[Snyk] Fix for 1 vulnerabilities #175

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
pull_request:
branches: [master]
push:
branches: [master]
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
test:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: setup
run: |
docker run -d -p 9000:9000 --name minio1 -e "MINIO_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE" \
-e "MINIO_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" minio/minio server /data
- name: run tests
run: |
mvn \
--no-transfer-progress \
--batch-mode \
-Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} \
clean test
publish:
if: github.ref == 'refs/heads/master'
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: setup git
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
- name: version
run: |
git checkout -f -b version-branch
export revision=`npm version patch --no-commit-hooks -m "$(git log -1 --pretty=%B) .... bump version [skip ci]"`
git push origin version-branch:master --follow-tags
echo revision=$revision >> $GITHUB_ENV
- uses: actions/setup-node@v1
with:
node-version: 14
- name: Install gpg secret key
run: |
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Set SNAPSHOT
run: |
echo suffix=-SNAPSHOT >> $GITHUB_ENV
- name: Deploy
run: |
mkdir ~/.m2
cp settings.xml ~/.m2/settings.xml
echo -Drevision=$revision$suffix
mvn \
--no-transfer-progress \
--batch-mode \
-Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} \
-Drevision=$revision$suffix \
-Drepo.id=ossrh \
-Drepo.login=${{ secrets.MVN_USER }} \
-Drepo.pwd=${{ secrets.MVN_PASSWORD }} \
-Dmaven.test.skip=true \
clean deploy
- name: trigger artifacts registry
uses: octokit/request-action@v2.x
with:
route: POST /repos/kube-HPC/artifacts-registry/dispatches
event_type: trigger
client_payload: "{\"version\": \"${{env.revision}}${{env.suffix}}\" , \"wrapper\": \"java\" , \"action\": \"dev-version\" }"
env:
GITHUB_TOKEN: '${{ secrets.GH_TOKEN }}'