Skip to content

Commit

Permalink
Update Check-in-automation.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuSoysal authored May 2, 2023
1 parent 4c46f56 commit 26cc442
Showing 1 changed file with 28 additions and 11 deletions.
39 changes: 28 additions & 11 deletions .github/workflows/Check-in-automation.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: Check-In automation

on:
workflow_dispatch:
schedule:
Expand All @@ -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 }}

0 comments on commit 26cc442

Please sign in to comment.