Skip to content

Cookies tarteaucitron étendu à l'ensemble des sous-domaines #24

Cookies tarteaucitron étendu à l'ensemble des sous-domaines

Cookies tarteaucitron étendu à l'ensemble des sous-domaines #24

Workflow file for this run

name: 📦 Docker Image Build & Push
on:
push:
branches:
- "**"
tags:
- "v*.*.*"
jobs:
docker:
if: github.repository == 'numerique-gouv/sites-faciles'
runs-on: ubuntu-latest
name: Build and push Docker image
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Inject enhanced GitHub environment variables
uses: rlespinasse/github-slug-action@v5
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Extract tag without leading v
if: startsWith(github.ref, 'refs/tags/v')
run: echo "TAG_NO_V=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: |
ghcr.io/${{ env.GITHUB_REPOSITORY_OWNER_PART_SLUG }}/sites-faciles:${{ env.GITHUB_REF_SLUG }}
${{ env.TAG_NO_V && format('ghcr.io/{0}/sites-faciles:latest', env.GITHUB_REPOSITORY_OWNER_PART_SLUG) || '' }}
${{ env.TAG_NO_V && format('ghcr.io/{0}/sites-faciles:{1}', env.GITHUB_REPOSITORY_OWNER_PART_SLUG, env.TAG_NO_V) || '' }}
cache-from: type=registry,ref=ghcr.io/${{ env.GITHUB_REPOSITORY_OWNER_PART_SLUG }}/sites-faciles:${{ env.GITHUB_REF_SLUG }}
cache-to: type=inline