diff options
author | deadprogram <[email protected]> | 2023-03-19 16:06:58 +0100 |
---|---|---|
committer | Ron Evans <[email protected]> | 2023-03-30 12:40:02 +0200 |
commit | 1213a451975de12f9ff71f20deebdf54dcbc9264 (patch) | |
tree | aab959457cb8e744ccb0e08fded0e0cd5a68021e /.github | |
parent | 4e4e4eee0419840e391dea9f12a90793532acd5b (diff) | |
download | tinygo-1213a451975de12f9ff71f20deebdf54dcbc9264.tar.gz tinygo-1213a451975de12f9ff71f20deebdf54dcbc9264.zip |
build: add GH workflow to build LLVM image when needed
Signed-off-by: deadprogram <[email protected]>
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/llvm.yml | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/.github/workflows/llvm.yml b/.github/workflows/llvm.yml new file mode 100644 index 000000000..314932547 --- /dev/null +++ b/.github/workflows/llvm.yml @@ -0,0 +1,63 @@ +# This is the Github action to build and push the LLVM Docker image +# used by the tinygo/tinygo-dev Docker image. +# +# It only needs to be rebuilt when updating the LLVM version. +# +# To update, make any needed changes to this file, +# then push to the "build-llvm-image" branch. +# +# The needed image will be rebuilt, which will very likely take at least 1-2 hours. +name: LLVM +on: + push: + branches: [ build-llvm-image ] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build-push-llvm: + name: build-push-llvm + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + steps: + - name: Check out the repo + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: | + tinygo/llvm-15 + ghcr.io/${{ github.repository_owner }}/llvm-15 + tags: | + type=sha,format=long + type=raw,value=latest + - name: Log in to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + - name: Log in to Github Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v4 + with: + target: tinygo-llvm-build + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max |