diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 70a8467..1f51dac 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -13,10 +13,6 @@ on: - '**/README.md' workflow_dispatch: -env: - MY_IMAGE_NAME: "${{ gitea.event.repository.name }}" # the name of the image produced by this build, matches repo names - MY_IMAGE_DESC: "My Customized Universal Blue Image" - jobs: build_push: name: Build and push image @@ -37,7 +33,7 @@ jobs: fetch-depth: 1 - name: Install Cosign - uses: sigstore/cosign-installer@v3.7.0 + uses: https://github.com/sigstore/cosign-installer@v3.7.0 - name: Set up QEMU uses: https://github.com/docker/setup-qemu-action@v3 @@ -54,37 +50,24 @@ jobs: username: ${{ secrets.USERNAME }} password: ${{ secrets.PASSWORD }} - # Build metadata - name: Image Metadata uses: https://github.com/docker/metadata-action@v5 id: meta with: - images: | - ${{ env.MY_IMAGE_NAME }} + images: gitea.mrdev023.fr/florian.richer/fedora_atomic_custom_image - labels: | - io.artifacthub.package.readme-url=https://gitea.mrdev023.fr/${{ gitea.repository }}/raw/branch/main/README.md - org.opencontainers.image.description=${{ env.MY_IMAGE_DESC }} - org.opencontainers.image.title=${{ env.MY_IMAGE_NAME }} - - # Build and push image using Docker Build and Push action - name: Build and Push Image uses: https://github.com/docker/build-push-action@v5 with: context: . file: ./Containerfile push: true - tags: gitea.mrdev023.fr/florian.richer/${{ env.MY_IMAGE_NAME }}:latest - - # This section is optional and only needs to be enabled if you plan on distributing - # your project for others to consume. You will need to create a public and private key - # using Cosign and save the private key as a repository secret in Github for this workflow - # to consume. For more details, review the image signing section of the README. + tags: gitea.mrdev023.fr/florian.richer/fedora_atomic_custom_image:latest - name: Sign container image if: gitea.event_name != 'pull_request' run: | - cosign sign -y --key env://COSIGN_PRIVATE_KEY gitea.mrdev023.fr/florian.richer/${{ env.MY_IMAGE_NAME }}:latest + cosign sign -y --key env://COSIGN_PRIVATE_KEY gitea.mrdev023.fr/florian.richer/fedora_atomic_custom_image:latest env: TAGS: ${{ steps.push.outputs.digest }} COSIGN_EXPERIMENTAL: false