Bump chainguard-dev/actions from 1.6.22 to 1.6.23 #712
Workflow file for this run
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: Create Early Access Release | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| types: | |
| - closed | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| DOCKER_IMAGE_NAME: schemacrawler/schemacrawler | |
| DOCKER_IMAGE_TAG: early-access-release | |
| DOCKERFILE_PATH: ./schemacrawler-distrib/Dockerfile | |
| DOCKER_CONTEXT_PATH: ./schemacrawler-distrib/target/_expanded-distribution/ | |
| jobs: | |
| build: | |
| name: Create Early Access Release | |
| if: | | |
| github.actor != 'dependabot[bot]' && | |
| ((github.event.pull_request.merged == true && | |
| github.event.pull_request.base.ref == 'main') || | |
| github.event_name == 'workflow_dispatch') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write # Required for OIDC authentication | |
| contents: write # Required to create a new tag | |
| steps: | |
| # SETUP BUILD ENVIRONMENT | |
| - id: prepare-maven-build | |
| name: Prepare Maven build | |
| uses: sualeh/prepare-maven-build@v1.7.2 | |
| with: | |
| java-version: 17 | |
| - id: install-graphviz | |
| name: Install Graphviz | |
| uses: sualeh/install-graphviz@v1.0.3 | |
| # BUILD DEPENDENCIES | |
| - id: build-schemacrawler-core | |
| name: Build SchemaCrawler-Core | |
| uses: sualeh/build-maven-dependency@v1.0.8 | |
| with: | |
| repository: schemacrawler/SchemaCrawler-Core | |
| artifact: us.fatehi:schemacrawler:17.11.3 | |
| # BUILD FOR DISTRIBUTION | |
| - id: build | |
| name: Build and test for distribution | |
| shell: bash | |
| run: | | |
| # Build | |
| # ... and install (for later phase of Docker image tests) | |
| mvn \ | |
| --no-transfer-progress \ | |
| --batch-mode \ | |
| -Ddistrib \ | |
| clean install | |
| - id: show-distrib | |
| name: Show distribution directory | |
| shell: bash | |
| run: | | |
| # Show distribution directory | |
| echo "Show distribution directory" | |
| ls -1R ./schemacrawler-distrib/target/_expanded-distribution | |
| # CREATE GITHUB RELEASE | |
| - id: create-release | |
| name: Create GitHub early access release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| target_commitish: ${{ github.sha }} | |
| tag_name: ${{ env.DOCKER_IMAGE_TAG }} | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| name: ${{ env.DOCKER_IMAGE_TAG }} | |
| draft: false | |
| prerelease: true | |
| body: | | |
| SchemaCrawler early access release at last commit ${{ github.sha }} | |
| generate_release_notes: true | |
| files: | | |
| ./schemacrawler-distrib/target/schemacrawler-17.11.3-bin.zip | |
| ./schemacrawler-distrib/target/schemacrawler-17.11.3-bin.zip.SHA-512 | |
| overwrite_files: true | |
| # MOVE GITHUB TAG | |
| - id: install-gitsign | |
| name: Install gitsign for commit signing | |
| # See https://github.com/chainguard-dev/actions/blob/main/setup-gitsign/action.yml | |
| uses: chainguard-dev/actions/setup-gitsign@5f020827ba80ff5d64d45116542d0c733e8e7e71 | |
| - id: move-tag | |
| name: Move early-access-release tag | |
| env: | |
| GITSIGN_CONNECTOR_ID: "https://github.com/login/oauth" | |
| GITSIGN_TOKEN_PROVIDER: "github-actions" | |
| shell: bash | |
| run: | | |
| # Move early-access-release tag | |
| # Set up user | |
| git config user.name "Sualeh Fatehi" | |
| git config user.email "sualeh@hotmail.com" | |
| # Confirm gitsign is installed | |
| gitsign --version | |
| # Move tag | |
| git tag -d ${{ env.DOCKER_IMAGE_TAG }} || true | |
| git push --delete origin ${{ env.DOCKER_IMAGE_TAG }} || true | |
| git tag -a ${{ env.DOCKER_IMAGE_TAG }} -m "SchemaCrawler AI Early Access Release" | |
| git push --follow-tags origin ${{ env.DOCKER_IMAGE_TAG }} | |
| git show --no-patch ${{ env.DOCKER_IMAGE_TAG }} | |
| # BUILD AND PUBLISH DOCKER IMAGE | |
| - id: setup-qemu | |
| name: Setup QEMU | |
| uses: docker/setup-qemu-action@v4 | |
| - id: setup-buildx | |
| name: Setup Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - id: docker-login | |
| name: Log into Docker Hub | |
| uses: docker/login-action@v4 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - id: validate-build-configuration | |
| name: Validate build configuration | |
| uses: docker/build-push-action@v7 | |
| with: | |
| call: check | |
| file: ${{ env.DOCKERFILE_PATH }} | |
| context: ${{ env.DOCKER_CONTEXT_PATH }} | |
| load: false | |
| push: false | |
| - id: meta | |
| name: Set up Docker metadata | |
| uses: docker/metadata-action@v6 | |
| with: | |
| images: | | |
| ${{ env.DOCKER_IMAGE_NAME }} | |
| tags: | | |
| type=raw,value=${{ env.DOCKER_IMAGE_TAG }},priority=1200 | |
| labels: | | |
| maintainer=Sualeh Fatehi <sualeh@hotmail.com> | |
| org.opencontainers.image.authors=Sualeh Fatehi <sualeh@hotmail.com> | |
| org.opencontainers.image.vendor=SchemaCrawler | |
| org.opencontainers.image.licenses=(EPL-2.0) | |
| org.opencontainers.image.url=https://www.schemacrawler.com/ | |
| org.opencontainers.image.documentation=https://github.com/schemacrawler/SchemaCrawler-Usage | |
| - id: build-docker-image | |
| name: Build Docker image locally | |
| uses: docker/build-push-action@v7 | |
| with: | |
| call: build | |
| file: ${{ env.DOCKERFILE_PATH }} | |
| context: ${{ env.DOCKER_CONTEXT_PATH }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| # Build just for runner platform | |
| platforms: linux/amd64 | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| annotations: ${{ steps.meta.outputs.annotations }} | |
| load: true | |
| push: false | |
| - id: test-docker-image | |
| name: Test Docker image build | |
| shell: bash | |
| run: | | |
| # Run the Testcontainers integration test | |
| # This will pull the Docker image, start and verify it | |
| mvn \ | |
| --no-transfer-progress \ | |
| --batch-mode \ | |
| -Dverify \ | |
| -Ddocker_image_tag=${{ env.DOCKER_IMAGE_TAG }} \ | |
| -pl schemacrawler-verify \ | |
| test | |
| - id: push-docker-image | |
| name: Build and push Docker image | |
| uses: docker/build-push-action@v7 | |
| with: | |
| call: build | |
| file: ${{ env.DOCKERFILE_PATH }} | |
| context: ${{ env.DOCKER_CONTEXT_PATH }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| platforms: |- | |
| linux/amd64 | |
| linux/arm64 | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| annotations: ${{ steps.meta.outputs.annotations }} | |
| sbom: true | |
| provenance: true | |
| load: false | |
| push: true |