Rationalisation du proxy #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish Proxy Image | |
| on: | |
| push: | |
| paths: | |
| - 'apps/proxy/**' | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| with: | |
| platforms: linux/amd64,linux/arm64 | |
| - name: Configure Docker Buildx | |
| run: | | |
| docker buildx create --name mybuilder | |
| docker buildx use mybuilder | |
| docker buildx inspect --bootstrap | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Login to GitHub Container Registry | |
| run: echo ${{ secrets.PAT }} | docker login ghcr.io --username feavy --password-stdin | |
| - name: Set SHORT_SHA | |
| id: vars | |
| run: echo "SHORT_SHA=$(echo $GITHUB_SHA | cut -c1-7)" >> $GITHUB_ENV | |
| - name: Build and push Docker Image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./apps/server/Dockerfile | |
| push: true | |
| tags: ghcr.io/feavy/workspace/server:${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || format('{0}-{1}', github.ref_name, env.SHORT_SHA) }} |