generated from MathieuSoysal/Java-Maven-Project-Template
-
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
1 parent
4c46f56
commit 26cc442
Showing
1 changed file
with
28 additions
and
11 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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
name: Check-In automation | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
|
@@ -11,19 +10,37 @@ on: | |
- cron: '2 12 * * *' | ||
- cron: '3 12 * * *' | ||
- cron: '4 12 * * *' | ||
|
||
jobs: | ||
|
||
check-in-automation: | ||
runs-on: ubuntu-latest | ||
|
||
|
||
steps: | ||
- name: install dependencies | ||
uses: awalsh128/cache-apt-pkgs-action@latest | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: 17 | ||
distribution: 'adopt' # Alternative distribution options are available. | ||
- name: Cache Maven packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2 | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-m2 | ||
- name: Build | ||
run: mvn compile | ||
- name: Run | ||
run: mvn exec:java -Dexec.mainClass="io.github.mathieusoysal.App" | ||
env: | ||
TEST_EMAIL: ${{ secrets.TEST_EMAIL }} | ||
TEST_PASSWORD: ${{ secrets.TEST_PASSWORD }} | ||
|
||
- name: Save trace | ||
uses: JamesIves/[email protected] | ||
with: | ||
packages: libglib2.0-0 libnss3 libnspr4 libatk1.0-0 libatk-bridge2.0-0 libx11-6 libxcomposite1 libxdamage1 libxext6 libxfixes3 libxrandr2 libgbm1 libxcb1 libxkbcommon0 libpango-1.0-0 libcairo2 libasound2 | ||
version: 1.0 | ||
|
||
- name: Run Checkin-automation | ||
run: docker run -e TEST_EMAIL=${{ secrets.TEST_EMAIL }} -e TEST_PASSWORD=${{ secrets.TEST_PASSWORD }} ghcr.io/mathieusoysal/42-check-in-automation:latest | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: archive | ||
clean: false | ||
folder: archive | ||
target-folder: archive/${{ github.event.release.tag_name }} |