File tree Expand file tree Collapse file tree 11 files changed +307
-1
lines changed
Expand file tree Collapse file tree 11 files changed +307
-1
lines changed Original file line number Diff line number Diff line change 1+ # Container image that runs your code
2+ FROM maven:3.6.2-jdk-14
3+
4+ # Copies your code file from your action repository to the filesystem path `/` of the container
5+ COPY entrypoint.sh /entrypoint.sh
6+
7+ # Make entrypoint.sh exacutable
8+ RUN chmod +x /entrypoint.sh
9+
10+ # Code file to execute when the docker container starts up (`entrypoint.sh`)
11+ ENTRYPOINT ["/entrypoint.sh" ]
Original file line number Diff line number Diff line change 1+ # action.yml
2+ name : ' Java Deploy'
3+ description : ' Deploys Java sdk to Maven'
4+ runs :
5+ using : ' docker'
6+ image : ' Dockerfile'
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ gpg --quiet --batch --yes --passphrase=$GPG_KEY_PASSPHRASE --output ./.github/secrets/private.key --decrypt ./.github/secrets/private.key.enc
4+
5+ gpg --import ./.github/secrets/private.key
6+ gpg --import ./.github/secrets/public.key
7+
8+ ls -la
9+
10+ cat << EOF > tempsettings.xml
11+ <settings>
12+ <servers>
13+ <server>
14+ <id>ossrh</id>
15+ <username>$MVN_USERNAME </username>
16+ <password>$MVN_PASSWORD </password>
17+ </server>
18+ </servers>
19+ </settings>
20+ EOF
21+
22+ mvn --settings ./tempsettings.xml deploy
Original file line number Diff line number Diff line change 1+ # Container image that runs your code
2+ FROM maven:3.6.2-jdk-14
3+
4+ # Copies your code file from your action repository to the filesystem path `/` of the container
5+ COPY entrypoint.sh /entrypoint.sh
6+
7+ # Make entrypoint.sh exacutable
8+ RUN chmod +x /entrypoint.sh
9+
10+ # Code file to execute when the docker container starts up (`entrypoint.sh`)
11+ ENTRYPOINT ["/entrypoint.sh" ]
Original file line number Diff line number Diff line change 1+ # action.yml
2+ name : ' Java Install'
3+ description : ' Runs Maven install command which will also run the tests'
4+ runs :
5+ using : ' docker'
6+ image : ' Dockerfile'
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ mvn install
Original file line number Diff line number Diff line change 1+ name : Deploy to Maven
2+
3+ on :
4+ release :
5+ types :
6+ - published
7+ jobs :
8+ deploy :
9+ name : Push the Java SDK Maven
10+ if : ${{ !github.event.release.prerelease && github.event.release.target_commitish == 'main' }}
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout
14+ uses : actions/checkout@v1
15+ - name : Java Maven Upload
16+ uses : ./.github/actions/deploy-maven
17+ env :
18+ MVN_USERNAME : ${{ secrets.MVN_USERNAME }}
19+ MVN_PASSWORD : ${{ secrets.MVN_PASSWORD }}
20+ GPG_KEY_PASSPHRASE : ${{ secrets.GPG_KEY_PASSPHRASE }}
Original file line number Diff line number Diff line change 1+ name : Deploy to Maven
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - main
7+
8+ jobs :
9+ deploy-java :
10+ name : Push the Java SDK Maven
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout
14+ uses : actions/checkout@v1
15+ - name : Java Maven Install
16+ uses : ./.github/actions/maven-install
You can’t perform that action at this time.
0 commit comments