Bump actions/cache from 4 to 5 (#6202) #550
This file contains hidden or 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
| name: Deploy artifacts | |
| on: | |
| push: | |
| tags: | |
| - '**' | |
| # Run for all branches except the following | |
| branches-ignore: | |
| - 'master' | |
| - 'release/**' | |
| - 'hotfix/**' | |
| - 'dependabot/**' | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| jobs: | |
| deploy_artifacts: | |
| uses: dockstore/workflow-actions/.github/workflows/deploy_artifacts.yaml@main | |
| with: | |
| createDockerImage: true | |
| quayRepository: dockstore-webservice | |
| secrets: inherit | |
| deploy_db_docs: | |
| if: ${{ github.ref_type == 'branch' && github.ref_name == 'develop' }} | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Service containers to run with `container-job` | |
| services: | |
| # Label used to access the service container | |
| postgres: | |
| # Docker Hub image | |
| image: postgres:16.9 | |
| # Provide the password for postgres | |
| env: | |
| POSTGRES_PASSWORD: dockstore | |
| POSTGRES_USER: dockstore | |
| POSTGRES_DB: webservice_test | |
| # Set health checks to wait until postgres has started | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| # Maps tcp port 5432 on service container to the host | |
| - 5432:5432 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| # Step that does that actual cache save and restore | |
| - uses: actions/cache@v5 | |
| with: | |
| path: ~/.m2/repository | |
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-maven- | |
| - name: Set up JDK | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '21.0.2+13.0.LTS' | |
| distribution: 'adopt' | |
| - name: Build | |
| run: ./mvnw -B clean install -DskipTests | |
| # deploy database documentation and also verify that non-confidential migrations seem sane | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Generate database documentation | |
| run: | | |
| rm dockstore-webservice/target/dockstore-webservice-*sources.jar || true | |
| java -jar dockstore-webservice/target/dockstore-webservice-*.jar db migrate --include 1.3.0.generated,1.3.1.consistency,1.4.0,1.5.0,1.6.0,1.7.0,1.8.0,1.9.0,1.10.0,1.11.0,1.12.0,1.13.0,1.14.0,1.15.0,1.16.0,1.17.0 dockstore-integration-testing/src/test/resources/dockstore.yml | |
| java -jar dockstore-webservice/target/dockstore-webservice-*.jar db generate-docs dockstore-integration-testing/src/test/resources/dockstore.yml generated-docs | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| # Upload entire repository | |
| path: 'generated-docs' | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |