From 26cc442000556ed36031f75b685edd05bd7b51c2 Mon Sep 17 00:00:00 2001 From: Mathieu Soysal <43273304+MathieuSoysal@users.noreply.github.com> Date: Tue, 2 May 2023 06:23:01 +0200 Subject: [PATCH] Update Check-in-automation.yml --- .github/workflows/Check-in-automation.yml | 39 ++++++++++++++++------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/.github/workflows/Check-in-automation.yml b/.github/workflows/Check-in-automation.yml index e9f3f70..a7d0d82 100644 --- a/.github/workflows/Check-in-automation.yml +++ b/.github/workflows/Check-in-automation.yml @@ -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/github-pages-deploy-action@v4.4.1 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 }}