Merge pull request #34 from cloud-pi-native/fix/issues #29
This file contains 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: Build | |
on: | |
push: | |
branches: | |
- main | |
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: Sync dso | |
run: | | |
curl -X POST --fail -F token=${{ secrets.GITLAB_TRIGGER_TOKEN }} -F ref=main -F "variables[GIT_BRANCH_DEPLOY]=${{ github.ref_name }}" -F variables[PROJECT_NAME]=doc ${{secrets.URL_MIRROR}} |