Skip to content

Commit

Permalink
Create Setup Java JDK
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Ken  <samkenxhub@gmail.com>
  • Loading branch information
samkenxstream committed Jun 7, 2023
1 parent c22c043 commit f7f565e
Showing 1 changed file with 85 additions and 0 deletions.
85 changes: 85 additions & 0 deletions .github/workflows/deploy.yml/Setup Java JDK
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: deploy
on:
push:
branches:
- deploy-staging
- deploy-production

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set staging variables
run: |
echo "ENVIRONMENT_URL=https://your_service.npm.red" >> $GITHUB_ENV
echo "DEPLOYMENT_CONFIDENCE_URL=${{ secrets.DATADOG_STAGING_DEPLOYMENT_DASHBOARD_URL }}" >> $GITHUB_ENV
if: github.ref == 'refs/heads/deploy-staging'

- name: Set production variables
run: |
echo "ENVIRONMENT_URL=https://your_service.internal.npmjs.com" >> $GITHUB_ENV
echo "DEPLOYMENT_CONFIDENCE_URL=${{ secrets.DATADOG_PRODUCTION_DEPLOYMENT_DASHBOARD_URL }}" >> $GITHUB_ENV
if: github.ref == 'refs/heads/deploy-production'

- name: create a deployment
uses: npm/action-deploy@v2
with:
type: create
token: ${{github.token}}
logs: https://github.slack.com/archives/C02UYAZ5P # npm-deploys channel
environment_url: ${{env.ENVIRONMENT_URL}}
deployment_confidence_url: ${{env.DEPLOYMENT_CONFIDENCE_URL}}
job_status: ${{job.status}} # keep that to track status of the current job, when deployment is completed
slack_token: ${{secrets.NPM_ROBOT_SLACK_TOKEN}}
slack_channel: npm-ops

# change to actual deployment steps
- name: placeholder for actual deployment
run: sleep 10s
- name: Setup Java JDK

uses: actions/setup-java@v1.4.4

with:

# The Java version to make available on the path. Takes a whole or semver Java version, or 1.x syntax (e.g. 1.8 => Java 8.x). Early access versions can be specified in the form of e.g. 14-ea, 14.0.0-ea, or 14.0.0-ea.28

java-version:

# The package type (jre, jdk, jdk+fx)

java-package: # optional, default is jdk

# The architecture (x86, x64) of the package.

architecture: # optional, default is x64

# Path to where the compressed JDK is located. The path could be in your source repository or a local path on the agent.

jdkFile: # optional

# ID of the distributionManagement repository in the pom.xml file. Default is `github`

server-id: # optional, default is github

# Environment variable name for the username for authentication to the Apache Maven repository. Default is $GITHUB_ACTOR

server-username: # optional, default is GITHUB_ACTOR

# Environment variable name for password or token for authentication to the Apache Maven repository. Default is $GITHUB_TOKEN

server-password: # optional, default is GITHUB_TOKEN

# Path to where the settings.xml file will be written. Default is ~/.m2.

settings-path: # optional

# GPG private key to import. Default is empty string.

gpg-private-key: # optional

# Environment variable name for the GPG private key passphrase. Default is $GPG_PASSPHRASE.

gpg-passphrase: # optional

0 comments on commit f7f565e

Please sign in to comment.