Compare commits

..

4 Commits

Author SHA1 Message Date
f2c6388da6 Fix env variable
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 50s
2025-05-30 15:35:57 +02:00
66c5891510 Remove fix
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 33s
2025-05-30 11:33:06 +02:00
eb6c40c2f5 Fix workflow
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 29s
2025-05-30 11:07:50 +02:00
19119e5c77 Fix workflow & add makefile
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 49s
2025-05-30 11:06:00 +02:00
2 changed files with 27 additions and 5 deletions

View File

@@ -12,7 +12,7 @@ on:
env: env:
REGISTRY: rgy.angels-dev.fr REGISTRY: rgy.angels-dev.fr
PATH: prod IMAGE_PATH: prod
IMAGE_NAME: bot_tamiseur IMAGE_NAME: bot_tamiseur
jobs: jobs:
@@ -40,7 +40,7 @@ jobs:
id: meta id: meta
uses: docker/metadata-action@v5 uses: docker/metadata-action@v5
with: with:
images: ${{ env.REGISTRY }}/${{ env.PATH }}/${{ env.IMAGE_NAME }} images: ${{ env.REGISTRY }}/${{ env.IMAGE_PATH }}/${{ env.IMAGE_NAME }}
tags: | tags: |
# Tag avec le nom de la branche # Tag avec le nom de la branche
type=ref,event=branch type=ref,event=branch
@@ -61,7 +61,7 @@ jobs:
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
with: with:
context: . context: .
platforms: linux/amd64,linux/arm64 # Multi-architecture si nécessaire platforms: linux/amd64,linux/arm64
push: true push: true
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
@@ -71,6 +71,6 @@ jobs:
- name: Generate artifact attestation - name: Generate artifact attestation
uses: actions/attest-build-provenance@v1 uses: actions/attest-build-provenance@v1
with: with:
subject-name: ${{ env.REGISTRY }}/${{ env.PATH }}/${{ env.IMAGE_NAME }} subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_PATH }}/${{ env.IMAGE_NAME }}
subject-digest: ${{ steps.build.outputs.digest }} subject-digest: ${{ steps.build.outputs.digest }}
push-to-registry: true push-to-registry: true

22
Makefile Normal file
View File

@@ -0,0 +1,22 @@
# =====================
# Build new application
# =====================
.PHONY: tag-build
tag-build: ## DEV : Build a prod version with a timestamped tag
@export TIMESTAMP=build_`date +"%G-%m-%d_%Hh%M"`; \
echo TAG = $$TIMESTAMP; \
git tag $$TIMESTAMP; \
git push origin $$TIMESTAMP;
# ===============
# Deployment tags
# ===============
.PHONY: tag-deploy
tag-deploy: ## DEV : Set tag to current HEAD to deploy in production
@export TIMESTAMP=deploy_`date +"%G-%m-%d_%Hh%M"`; \
echo TAG = $$TIMESTAMP; \
git tag $$TIMESTAMP; \
git push origin $$TIMESTAMP;