From 638a374dffd141fc6d33628a84905e728835659c Mon Sep 17 00:00:00 2001 From: Slawomir Jaranowski Date: Mon, 30 Aug 2021 08:23:28 +0200 Subject: [PATCH] Use actions/checkout --- README.md | 14 ++++++++++++-- action.yml | 13 +++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8969735..cb3ba4c 100644 --- a/README.md +++ b/README.md @@ -3,17 +3,20 @@ This is composite action which help to prepare GitHub Actions environment for Maven build by calling: +- [actions/checkout](https://github.com/marketplace/actions/checkout) - [actions/setup-java](https://github.com/marketplace/actions/setup-java-jdk) - [actions/cache](https://github.com/marketplace/actions/cache) - [stCarolas/setup-maven](https://github.com/marketplace/actions/setup-maven) - [s4u/maven-settings-action](https://github.com/marketplace/actions/maven-settings-action) # Contributions + - Contributions are welcome! - Give :star: - if you want to encourage me to work on a project - Don't hesitate to create issues for new features you dream of or if you suspect some bug # Project versioning + This project uses [Semantic Versioning](https://semver.org/). We recommended to use the latest and specific release version. @@ -22,6 +25,13 @@ or use automatic tools like [Dependabot](https://docs.github.com/en/code-securit # Params mapping for sub actions +## checkout + +| params | destination | +| -------------------------- |------------------ | +| checkout-fetch-depth | fetch-depth | + + ## setup-java | params | destination | default | @@ -82,13 +92,13 @@ jobs: name: Maven ${{ matrix.maven }} sample steps: - - uses: actions/checkout@v2 - name: Setup Maven with settings.xml - uses: s4u/setup-maven-action@v1.0.0 + uses: s4u/setup-maven-action@< version > with: java-version: 8 maven-version: ${{ matrix.maven }} + - run: mvn -V ... ``` diff --git a/action.yml b/action.yml index 0fca5fd..43ee749 100644 --- a/action.yml +++ b/action.yml @@ -7,6 +7,11 @@ branding: inputs: + # checkout + checkout-fetch-depth: + description: 'Number of commits to fetch' + required: false + # java jdk params java-version: @@ -60,6 +65,14 @@ runs: steps: + - run: echo "::group::Checkout" + shell: bash + - uses: actions/checkout@v2.3.4 + with: + fetch-depth: '${{ inputs.checkout-fetch-depth }}' + - run: echo "::endgroup::" + shell: bash + - run: echo "::group::Setup Java" shell: bash - uses: actions/setup-java@v2.3.0