diff --git a/.github/workflows/OdooBuild.yaml b/.github/workflows/OdooBuild.yaml new file mode 100644 index 0000000..e90f2df --- /dev/null +++ b/.github/workflows/OdooBuild.yaml @@ -0,0 +1,48 @@ +name: OdooBuild + +on: + push: + #tags: + # - 'odoo*' + +env: + REGISTRY: ghcr.io + IMAGE_NAME: odoo + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Log in to the GitHub container registry + uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v3 + with: + context: . + file: OdooDocker16/Dockerfile + platforms: linux/arm64 + pull: true + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file