Skip to content

Update actions/checkout action to v4 #366

Update actions/checkout action to v4

Update actions/checkout action to v4 #366

Workflow file for this run

name: 'Continuous Integration'
on:
push:
workflow_dispatch:
schedule:
- cron: '7 0 * * SUN'
env:
GRADLE_OPTS: >-
-Dorg.gradle.project.eu.xenit.cloudsmith.username=${{ secrets.CLOUDSMITH_USER }}
-Dorg.gradle.project.eu.xenit.cloudsmith.password=${{ secrets.CLOUDSMITH_APIKEY }}
jobs:
integration-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version:
- solr6
task:
- integrationTestDefault
- integrationTestSharded
- integrationTestShardedNonSsl
- integrationTestNonSsl
- integrationTestMounts
- integrationTestXenitEndpoints
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-java@v1
with:
java-version: 1.11
- name: Add license
run: |
touch ./src/integrationTest/resources/license61/license.lic
echo ${{secrets.ALFRESCO_LICENSE61}} > ./src/integrationTest/resources/license61/license.lic
chmod 666 ./src/integrationTest/resources/license61/license.lic
- name: Login to Docker
run: |
echo "${{ secrets.CLOUDSMITH_APIKEY }}" | docker login private.docker.xenit.eu --username "${{ secrets.CLOUDSMITH_USER }}" --password-stdin
- name: Integration tests
uses: gradle/gradle-build-action@a4cf152f482c7ca97ef56ead29bf08bcd953284c # v2
env:
VERSIONS_TO_BUILD: ${{ matrix.version }}
with:
cache-read-only: false
arguments: ${{ matrix.task }} --info
- name: Upload Artifact
if: success() || failure()
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.task }}-result
path: /home/runner/work/**/build/reports
retention-days: 2
publish:
needs: [ integration-test ]
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/heads/master') || startsWith(github.ref, 'refs/heads/release') }}
strategy:
matrix:
version:
- solr6
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Login to CloudSmith
run: |
echo "${{ secrets.CLOUDSMITH_APIKEY }}" | docker login private.docker.xenit.eu --username "${{ secrets.CLOUDSMITH_USER }}" --password-stdin
# We have to split out publishing to public and private repo's because pushing to docker.io does not seem to work
# without supplying DOCKER_USER and DOCKER_PASSWORD. However, supplying those environment variables breaks
# publishing to other repositories
- name: Publish public docker images
uses: gradle/gradle-build-action@a4cf152f482c7ca97ef56ead29bf08bcd953284c # v2
env:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
VERSIONS_TO_BUILD: ${{ matrix.version }}
with:
cache-read-only: false
arguments: pushDockerImage -PincludeEnterprise=false
- name: Publish private docker images
uses: gradle/gradle-build-action@a4cf152f482c7ca97ef56ead29bf08bcd953284c # v2
env:
VERSIONS_TO_BUILD: ${{ matrix.version }}
with:
cache-read-only: false
arguments: pushDockerImage -PincludeCommunity=false