Bump docker/login-action from 4.5.2 to 4.6.0 (#3712) #1174
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: "Development" | |
| on: | |
| push: | |
| branches: | |
| - "development" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version" | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: 21 | |
| distribution: "temurin" | |
| - name: Set up Maven | |
| uses: stCarolas/setup-maven@v5 | |
| with: | |
| maven-version: 3.9.9 | |
| - name: Cache | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.m2/repository | |
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: ${{ runner.os }}-maven- | |
| - name: Install clamdscan | |
| run: sudo apt-get update && sudo apt-get install clamdscan -y | |
| - name: Run tests & install | |
| run: mvn $MAVEN_CLI_OPTS -Dtestng.groups="travis" -Denforcer.skip=true clean org.jacoco:jacoco-maven-plugin:prepare-agent install | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| #- name: Find generated JAR | |
| # id: jar-location | |
| # run: | | |
| # # Find the jar matching your pattern and pick the first match | |
| # JAR_PATH=$(ls roda-ui/roda-wui/target/roda-wui-*.jar | head -n 1) | |
| # echo "path=$JAR_PATH" >> $GITHUB_OUTPUT | |
| #- name: Generate SBOM with Syft | |
| # uses: anchore/sbom-action@v0 | |
| # with: | |
| # file: ${{ steps.jar-location.outputs.path }} | |
| # format: spdx-json | |
| # output-file: sbom.spdx.json | |
| #- name: Scan SBOM with Grype | |
| # uses: anchore/scan-action@v7 | |
| # id: scan | |
| # with: | |
| # sbom: sbom.spdx.json | |
| # fail-build: true | |
| # severity-cutoff: high | |
| - name: Deploy to GitHub packages | |
| run: mvn $MAVEN_CLI_OPTS clean deploy -Dmaven.test.skip=true -Pcore | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Prepare JAR for artifact upload | |
| run: | | |
| mkdir -p /tmp/roda-jar | |
| cp roda-ui/roda-wui/target/roda-wui-*.jar /tmp/roda-jar/ | |
| - name: Upload JAR artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: roda-jar | |
| path: /tmp/roda-jar/ | |
| retention-days: 1 | |
| docker: | |
| runs-on: ${{ matrix.runner }} | |
| needs: build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: linux/amd64 | |
| runner: ubuntu-latest | |
| - platform: linux/arm64 | |
| runner: ubuntu-24.04-arm | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Prepare platform tag | |
| run: echo "platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-')" >> $GITHUB_ENV | |
| - name: Download JAR artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: roda-jar | |
| path: docker/target | |
| - name: Docker meta | |
| id: meta | |
| uses: docker/metadata-action@v6 | |
| with: | |
| images: ghcr.io/keeps/roda | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v4.6.0 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push by digest | |
| id: build | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: docker | |
| platforms: ${{ matrix.platform }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| sbom: true | |
| provenance: mode=max | |
| outputs: type=image,name=ghcr.io/keeps/roda,push-by-digest=true,name-canonical=true,push=true | |
| - name: Export digest | |
| run: | | |
| mkdir -p /tmp/digests | |
| digest="${{ steps.build.outputs.digest }}" | |
| touch "/tmp/digests/${digest#sha256:}" | |
| - name: Upload digest | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: digests-${{ env.platform_tag }} | |
| path: /tmp/digests/* | |
| if-no-files-found: error | |
| retention-days: 1 | |
| merge: | |
| runs-on: ubuntu-latest | |
| needs: docker | |
| steps: | |
| - name: Download digests | |
| uses: actions/download-artifact@v8 | |
| with: | |
| path: /tmp/digests | |
| pattern: digests-* | |
| merge-multiple: true | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v4.6.0 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Login to DockerHub container registry | |
| uses: docker/login-action@v4.6.0 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
| - name: Create manifest list and push to GHCR | |
| working-directory: /tmp/digests | |
| run: | | |
| docker buildx imagetools create \ | |
| -t ghcr.io/keeps/roda:development \ | |
| $(printf 'ghcr.io/keeps/roda@sha256:%s ' *) | |
| - name: Create manifest list and push to DockerHub | |
| working-directory: /tmp/digests | |
| run: | | |
| docker buildx imagetools create \ | |
| -t keeps/roda:development \ | |
| $(printf 'ghcr.io/keeps/roda@sha256:%s ' *) | |
| - name: Inspect image | |
| run: docker buildx imagetools inspect ghcr.io/keeps/roda:development | |
| - name: Trigger KEEPS GitLab CI/CD | |
| run: | | |
| curl -X POST \ | |
| --fail \ | |
| -F token=${{ secrets.GITLAB_RODA_DEV_TRIGGER_TOKEN }} \ | |
| -F variables[DOCKER_TAG]=development \ | |
| -F ref=development \ | |
| ${{ secrets.GITLAB_RODA_DEV_TRIGGER }} | |
| e2e: | |
| runs-on: ubuntu-latest | |
| needs: merge | |
| env: | |
| MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: 21 | |
| distribution: 'temurin' | |
| - name: Set up Maven | |
| uses: stCarolas/setup-maven@v5 | |
| with: | |
| maven-version: 3.9.9 | |
| - name: Cache Maven dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.m2/repository | |
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: ${{ runner.os }}-maven- | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v4.6.0 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
| - name: Pull RODA development image | |
| run: docker pull docker.io/keeps/roda:development | |
| - name: Run E2E API tests | |
| run: mvn $MAVEN_CLI_OPTS -Pe2e test | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |