Skip to content

init (#54)

init (#54) #51

Workflow file for this run

name: Build
on:
push:
branches:
- main
paths:
- docs/**
workflow_dispatch:
jobs:
build:
name: Build application
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checks-out repository
uses: actions/checkout@v4
- name: Set up Docker buildx
uses: docker/setup-buildx-action@v3
- name: Set up QEMU (for multi platform build)
uses: docker/setup-qemu-action@v3
- name: Login to Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
logout: true
- name: Build docker image
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
tags: ghcr.io/${{ github.repository }}:latest
target: prod
platforms: linux/amd64,linux/arm64
push: true
- name: Deploy new image
run: |
curl -X POST https://gitops.fabrique-numerique.fr/api/v1/applications/cloud-pi-native-docs/sync \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${{ secrets.ARGOCD_TOKEN }}" \
-d '${{ vars.ARGOCD_SYNC_PAYLOAD }}'