build: bump version 0.1.0 -> 0.1.1 #13
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: 'Docker' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.sha }} | |
| cancel-in-progress: true | |
| on: | |
| push: | |
| branches: | |
| - '*' | |
| tags: | |
| - '*' | |
| env: | |
| TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db:2 # see https://github.com/nofusscomputing/action_python/issues/10 | |
| DOCKER_BUILD_REGISTRY: ghcr.io | |
| DOCKER_BUILD_IMAGE_NAME: "nofusscomputing/mkdocs-ci" | |
| DOCKER_BUILD_IMAGE_TAG: ${{ github.sha }} | |
| DOCKER_PUBLISH_REGISTRY: "docker.io" | |
| DOCKER_PUBLISH_IMAGE_NAME: "nofusscomputing/mkdocs-ci" | |
| DOCKER_BUILD_USERNAME: ${{ github.actor }} | |
| DOCKER_BUILD_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | |
| DOCKER_PUBLISH_USERNAME: ${{ secrets.NFC_DOCKERHUB_USERNAME }} | |
| DOCKER_PUBLISH_PASSWORD: ${{ secrets.NFC_DOCKERHUB_TOKEN }} | |
| DOCKER_FILE: dockerfile | |
| jobs: | |
| docker-build: | |
| runs-on: ubuntu-latest | |
| name: Build Image | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Log into GHCR Registry | |
| uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 | |
| with: | |
| registry: ${{ env.DOCKER_BUILD_REGISTRY }} | |
| username: ${{ env.DOCKER_BUILD_USERNAME }} | |
| password: ${{ env.DOCKER_BUILD_PASSWORD }} | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| with: | |
| image: tonistiigi/binfmt:latest | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and push | |
| if: ${{ ! startsWith(github.ref, 'refs/tags/') }} | |
| uses: docker/build-push-action@v6 | |
| with: | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: ${{ env.DOCKER_BUILD_REGISTRY }}/${{ env.DOCKER_BUILD_IMAGE_NAME }}:${{ github.sha }} | |
| provenance: false | |
| sbom: false | |
| - name: Log into Publish Registry | |
| if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 | |
| with: | |
| registry: ${{ env.DOCKER_PUBLISH_REGISTRY }} | |
| username: ${{ env.DOCKER_PUBLISH_USERNAME }} | |
| password: ${{ env.DOCKER_PUBLISH_PASSWORD }} | |
| - name: Build and push tagged | |
| if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| uses: docker/build-push-action@v6 | |
| with: | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: | | |
| ${{ env.DOCKER_BUILD_REGISTRY }}/${{ env.DOCKER_BUILD_IMAGE_NAME }}:${{ github.sha }} | |
| ${{ env.DOCKER_BUILD_REGISTRY }}/${{ env.DOCKER_BUILD_IMAGE_NAME }}:${{ github.ref_name }} | |
| ${{ env.DOCKER_BUILD_REGISTRY }}/${{ env.DOCKER_BUILD_IMAGE_NAME }}:latest | |
| ${{ env.DOCKER_PUBLISH_REGISTRY }}/${{ env.DOCKER_PUBLISH_IMAGE_NAME }}:${{ github.sha }} | |
| ${{ env.DOCKER_PUBLISH_REGISTRY }}/${{ env.DOCKER_PUBLISH_IMAGE_NAME }}:${{ github.ref_name }} | |
| ${{ env.DOCKER_PUBLISH_REGISTRY }}/${{ env.DOCKER_PUBLISH_IMAGE_NAME }}:latest | |
| provenance: false | |
| sbom: false | |
| docker-publish: | |
| if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| runs-on: ubuntu-latest | |
| needs: | |
| - docker-build | |
| name: Publish | |
| steps: | |
| - name: Append GH Release Body | |
| id: release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| append_body: true | |
| draft: false | |
| body: | | |
| ### Images part of this release | |
| The following images were built and published: | |
| - `docker pull ${{ env.DOCKER_PUBLISH_REGISTRY }}/${{ env.DOCKER_PUBLISH_IMAGE_NAME }}:${{ steps.tag-image.outputs.mutable_tag_name }}` | |
| - `docker pull ${{ env.DOCKER_PUBLISH_REGISTRY }}/${{ env.DOCKER_PUBLISH_IMAGE_NAME }}:${{ env.DOCKER_TAG_IMAGE_TAG_SOURCE }}` | |
| - `docker pull ${{ env.DOCKER_PUBLISH_REGISTRY }}/${{ env.DOCKER_PUBLISH_IMAGE_NAME }}:${{ github.ref_name }}` |