diff --git a/.github/Dockerfile b/.github/Dockerfile new file mode 100644 index 0000000..625a8f8 --- /dev/null +++ b/.github/Dockerfile @@ -0,0 +1,10 @@ +FROM ghcr.io/readon/spinalhdl:master + +ARG JAVA_EXTRA_OPTS="-Xmx2g -Xms2g" +ENV JAVA_OPTS="${JAVA_OPTS} ${JAVA_EXTRA_OPTS}" +RUN git clone https://github.com/SpinalHDL/SpinalTemplateSbt.git && \ + cd SpinalTemplateSbt && \ + git submodule update --init --recursive && \ + sbt compile && \ + mill _.compile && \ + cd .. && rm -rf SpinalTemplateSbt diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..5cdebdb --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,43 @@ +name: Build and Push Docker Image + +on: + push: + branches: + - master + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build-and-push: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Check out the repo + uses: actions/checkout@v2 + + - name: Log in to the Container registry + uses: docker/login-action@v1 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - name: Build and push Docker image + uses: docker/build-push-action@v4 + with: + context: . + file: .github/Dockerfile + push: true + labels: ${{ steps.meta.outputs.labels }} + tags: ${{ steps.meta.outputs.tags }} \ No newline at end of file diff --git a/.mill-version b/.mill-version index e3e1807..f314d02 100644 --- a/.mill-version +++ b/.mill-version @@ -1 +1 @@ -0.9.8 +0.10.9