|
4 | 4 |
|
5 | 5 | [](https://github.com/marketplace/actions/docker-build-and-publish) [](https://github.com/philips-software/docker-ci-scripts/releases) |
6 | 6 |
|
| 7 | +--- |
| 8 | + |
| 9 | +## ⚠️ DEPRECATION NOTICE ⚠️ |
| 10 | + |
| 11 | +**This action is deprecated and will no longer receive updates.** |
| 12 | + |
| 13 | +We recommend migrating to the official Docker GitHub Actions, which now provide equivalent functionality with better support and features: |
| 14 | + |
| 15 | +### Migration Path |
| 16 | + |
| 17 | +For building and pushing Docker images with multiple tags, use the official Docker actions: |
| 18 | + |
| 19 | +1. **Set up Docker Buildx**: [`docker/setup-buildx-action`](https://github.com/docker/setup-buildx-action) |
| 20 | +2. **Generate image metadata and tags**: [`docker/metadata-action`](https://github.com/docker/metadata-action) |
| 21 | +3. **Build and push images**: [`docker/build-push-action`](https://github.com/docker/build-push-action) |
| 22 | + |
| 23 | +### Signing and Attestations |
| 24 | + |
| 25 | +For signing and SBOM/provenance attestations, use GitHub's built-in attestation support: |
| 26 | + |
| 27 | +- The latest [`docker/build-push-action`](https://github.com/docker/build-push-action) has native support for SBOM and provenance |
| 28 | +- See: [Docker Build Attestations Documentation](https://docs.docker.com/build/ci/github-actions/attestations/) |
| 29 | + |
| 30 | +### Example Migration |
| 31 | + |
| 32 | +```yaml |
| 33 | +- name: Set up Docker Buildx |
| 34 | + uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 |
| 35 | + id: buildx |
| 36 | + |
| 37 | +- name: Login to Artifactory |
| 38 | + uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 |
| 39 | + with: |
| 40 | + registry: dl-innersource-docker.artifactory-ehv.ta.philips.com |
| 41 | + username: ${{ secrets.ARTIFACTORY_USERNAME }} |
| 42 | + password: ${{ secrets.ARTIFACTORY_PASSWORD }} |
| 43 | + |
| 44 | +- name: Docker metadata |
| 45 | + id: meta |
| 46 | + uses: docker/metadata-action@318604b99e75e41977312d83839a89be02ca4893 # v5.9.0 |
| 47 | + with: |
| 48 | + images: ghcr.io/${{ github.repository }} |
| 49 | + tags: | |
| 50 | + type=schedule,pattern=nightly |
| 51 | + type=semver,pattern={{version}} |
| 52 | + type=ref,event=branch,suffix=-{{sha}} |
| 53 | + type=ref,event=pr,suffix=-{{sha}} |
| 54 | +
|
| 55 | +- name: Build and push Docker image |
| 56 | + uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0 |
| 57 | + with: |
| 58 | + context: . |
| 59 | + file: ./Dockerfile |
| 60 | + push: true |
| 61 | + tags: ${{ steps.meta.outputs.tags }} |
| 62 | + labels: ${{ steps.meta.outputs.labels }} |
| 63 | +``` |
| 64 | +
|
| 65 | +--- |
| 66 | +
|
7 | 67 | This action will build a docker image from a given directory. |
8 | 68 |
|
9 | 69 | </div> |
|
0 commit comments