Remove atlas/example/contacts/v1 #11
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: APX On Merge | |
| on: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| attestations: write | |
| jobs: | |
| catalog: | |
| runs-on: ubuntu-latest | |
| env: | |
| IMAGE: ghcr.io/infobloxopen/${{ github.event.repository.name }}-catalog | |
| steps: | |
| - name: Generate App Token | |
| id: app-token | |
| uses: actions/create-github-app-token@v1 | |
| with: | |
| app-id: ${{ secrets.APX_APP_ID }} | |
| private-key: ${{ secrets.APX_APP_PRIVATE_KEY }} | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ steps.app-token.outputs.token }} | |
| - name: Install APX | |
| uses: infobloxopen/apx@main | |
| - name: Validate schemas | |
| run: apx lint | |
| - name: Generate catalog data | |
| run: apx catalog generate --output catalog/catalog.yaml | |
| - name: Log in to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build catalog image | |
| run: | | |
| docker build \ | |
| --build-arg CREATED="$(date -u +%Y-%m-%dT%H:%M:%SZ)" \ | |
| --build-arg REVISION="${{ github.sha }}" \ | |
| --build-arg SOURCE="https://github.com/${{ github.repository }}" \ | |
| --build-arg VERSION="${{ github.sha }}" \ | |
| -t "$IMAGE:latest" \ | |
| -t "$IMAGE:sha-${GITHUB_SHA::7}" \ | |
| catalog/ | |
| - name: Push catalog image | |
| id: push | |
| run: | | |
| docker push "$IMAGE:latest" | |
| docker push "$IMAGE:sha-${GITHUB_SHA::7}" | |
| DIGEST=$(docker inspect --format='{{index .RepoDigests 0}}' "$IMAGE:latest" | cut -d@ -f2) | |
| echo "digest=$DIGEST" >> "$GITHUB_OUTPUT" | |
| - name: Attest build provenance | |
| uses: actions/attest-build-provenance@v2 | |
| with: | |
| subject-name: ${{ env.IMAGE }} | |
| subject-digest: ${{ steps.push.outputs.digest }} | |
| push-to-registry: true | |
| - name: Generate SBOM | |
| uses: anchore/sbom-action@v0 | |
| with: | |
| image: ${{ env.IMAGE }}:latest | |
| output-file: sbom.spdx.json | |
| - name: Attest SBOM | |
| uses: actions/attest-sbom@v2 | |
| with: | |
| subject-name: ${{ env.IMAGE }} | |
| subject-digest: ${{ steps.push.outputs.digest }} | |
| sbom-path: sbom.spdx.json | |
| push-to-registry: true |