chore: tag container with git tag

Allow all tags and tag the matterlabsrobot container with it.

Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
This commit is contained in:
Harald Hoyer 2024-09-17 14:48:49 +02:00
parent 3b7041b459
commit e7b743b213
Signed by: harald
GPG key ID: F519A1143B3FBE32

View file

@ -5,7 +5,7 @@ on:
branches: [ "main" ] branches: [ "main" ]
push: push:
branches: [ "main" ] branches: [ "main" ]
tags: [ "*-sgx-*" ] tags: [ "*" ]
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.ref }} group: ${{ github.workflow }}-${{ github.ref }}
@ -121,6 +121,12 @@ jobs:
docker tag "${{ steps.build.outputs.IMAGE_TAG }}" matterlabsrobot/"${{ steps.build.outputs.IMAGE_NAME }}:latest" docker tag "${{ steps.build.outputs.IMAGE_TAG }}" matterlabsrobot/"${{ steps.build.outputs.IMAGE_NAME }}:latest"
docker push matterlabsrobot/"${{ steps.build.outputs.IMAGE_NAME }}:latest" docker push matterlabsrobot/"${{ steps.build.outputs.IMAGE_NAME }}:latest"
- name: Tag container with tag
if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
run: |
docker tag "${{ steps.build.outputs.IMAGE_TAG }}" matterlabsrobot/"${{ steps.build.outputs.IMAGE_NAME }}:$GITHUB_REF_NAME"
docker push matterlabsrobot/"${{ steps.build.outputs.IMAGE_NAME }}:$GITHUB_REF_NAME"
- name: Generate build ID for Flux Image Automation - name: Generate build ID for Flux Image Automation
id: flux id: flux
if: ${{ github.event_name == 'push' && !startsWith(github.ref, 'refs/tags') }} if: ${{ github.event_name == 'push' && !startsWith(github.ref, 'refs/tags') }}