-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
112 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Build Tomcat | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out tomcat-users.xml | ||
uses: actions/checkout@v2 | ||
|
||
- name: List project files and java version | ||
run: | | ||
ls -ltr | ||
java -version | ||
- name: Check out Apache Tomcat | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: apache/tomcat # Repository name with owner | ||
ref: master # The branch, tag or SHA to checkout | ||
path: ./tomcat # Relative path under $GITHUB_WORKSPACE | ||
|
||
- name: Setup Java 9 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: '9.0.4' # The JDK version to make available on the path | ||
java-package: jdk # (jre, jdk, or jdk+fx) - defaults to jdk | ||
architecture: x64 # (x64 or x86) - defaults to x64 | ||
|
||
- name: List project files and java version | ||
run: | | ||
ls -ltr | ||
java -version | ||
- name: Copy tomcat-users.xml into Tomcat configuration directory | ||
run: cp -v tomcat-users.xml ./tomcat/conf/tomcat-users.xml | ||
|
||
- name: Compile Tomcat | ||
run: | | ||
cd ./tomcat | ||
ant |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,53 @@ | ||
# Chapter 01_01 | ||
# Passing arguments to an action | ||
|
||
- Create a repository on GitHub using the [New Repository](https://github.com/new) page. Name it something that relates to the lesson like `exercise-files`. | ||
In this lesson, arguments are passed to the following actions: | ||
|
||
- In a terminal, run the following commands to initialize the directory as a git repository. | ||
- [actions/checkout](https://github.com/actions/checkout) | ||
- [actions/setup-java](https://github.com/actions/setup-java) | ||
|
||
git init | ||
git add . | ||
git commit -m 'first check in' | ||
``` | ||
name: Build Tomcat | ||
- Now add the new repository you created as a remote for the local repo. | ||
on: [push] | ||
git remote add origin [email protected]:YOUR_GITHUB_USER_NAME_HERE/exercise-files.git | ||
jobs: | ||
build: | ||
- After the remote is added, push the files to the remote. | ||
runs-on: ubuntu-latest | ||
git push -u origin master | ||
steps: | ||
- name: Check out tomcat-users.xml | ||
uses: actions/checkout@v2 | ||
- Browse to the repository on GitHub.com and reload the page to confirm the files have been properly pushed. | ||
- name: List project files and java version | ||
run: | | ||
ls -ltr | ||
java -version | ||
Once the files are hosted on GitHub.com, you're ready to start making changes locally and pushing them to the remote repo. | ||
# GA-lesson-01-01 | ||
- name: Check out Apache Tomcat | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: apache/tomcat # Repository name with owner | ||
ref: master # The branch, tag or SHA to checkout | ||
path: ./tomcat # Relative path under $GITHUB_WORKSPACE | ||
- name: Setup Java 9 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: '9.0.4' # The JDK version to make available on the path | ||
java-package: jdk # (jre, jdk, or jdk+fx) - defaults to jdk | ||
architecture: x64 # (x64 or x86) - defaults to x64 | ||
- name: List project files and java version | ||
run: | | ||
ls -ltr | ||
java -version | ||
- name: Copy tomcat-users.xml into Tomcat configuration directory | ||
run: cp -v tomcat-users.xml ./tomcat/conf/tomcat-users.xml | ||
- name: Compile Tomcat | ||
run: | | ||
cd ./tomcat | ||
ant | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<tomcat-users xmlns="http://tomcat.apache.org/xml" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd" | ||
version="1.0"> | ||
|
||
<role rolename="manager-gui"/> | ||
|
||
<role rolename="manager-script"/> | ||
|
||
<role rolename="manager-jmx"/> | ||
|
||
<role rolename="manager-status"/> | ||
|
||
<role rolename="admin-gui"/> | ||
|
||
<role rolename="admin-script"/> | ||
|
||
<user username="superadmin" | ||
password="shouldreallychangethis" | ||
roles="manager-gui,manager-script,manager-jmx,manager-status,admin-gui,admin-script"/> | ||
|
||
</tomcat-users> |