From f9ef5bf07b03e1480484531eb33aa0b39076ee68 Mon Sep 17 00:00:00 2001 From: Florian RICHER Date: Fri, 11 Oct 2024 22:54:03 +0200 Subject: [PATCH] Try more simple example --- .gitea/workflows/build.yml | 45 +------------------------------------- 1 file changed, 1 insertion(+), 44 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index a676b2b..0f4bf32 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -16,7 +16,6 @@ on: 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" - IMAGE_REGISTRY: "gitea.mrdev023.fr/florian.richer" # do not edit jobs: build_push: @@ -43,47 +42,6 @@ jobs: - name: Set up Docker Buildx uses: https://github.com/docker/setup-buildx-action@v3 - - name: Generate tags - id: generate-tags - shell: bash - run: | - # Generate a timestamp for creating an image version history - TIMESTAMP="$(date +%Y%m%d)" - COMMIT_TAGS=() - BUILD_TAGS=() - - # Have tags for tracking builds during pull request - SHA_SHORT="${GITEA_SHA::7}" - COMMIT_TAGS+=("pr-${{ gitea.event.number }}") - COMMIT_TAGS+=("${SHA_SHORT}") - - # Append matching timestamp tags to keep a version history - for TAG in "${BUILD_TAGS[@]}"; do - BUILD_TAGS+=("${TAG}-${TIMESTAMP}") - done - - BUILD_TAGS+=("${TIMESTAMP}") - BUILD_TAGS+=("latest") - - if [[ "${{ gitea.event_name }}" == "pull_request" ]]; then - echo "Generated the following commit tags: " - for TAG in "${COMMIT_TAGS[@]}"; do - echo "${TAG}" - done - - alias_tags=("${COMMIT_TAGS[@]}") - else - alias_tags=("${BUILD_TAGS[@]}") - fi - - echo "Generated the following build tags: " - for TAG in "${BUILD_TAGS[@]}"; do - echo "${TAG}" - done - - alias_tags_string=$(IFS=, ; echo "${alias_tags[*]}") - echo "alias_tags=${alias_tags_string}" >> $GITEA_OUTPUT - # Build metadata - name: Image Metadata uses: https://github.com/docker/metadata-action@v5 @@ -111,8 +69,7 @@ jobs: context: . file: ./Containerfile push: true - tags: ${{ steps.generate-tags.outputs.alias_tags }} - labels: ${{ steps.meta.outputs.labels }} + 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