github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/.github/workflows/docker.yml (about) 1 # This is the Github action to build and push the tinygo/tinygo-dev Docker image. 2 # If you are looking for the tinygo/tinygo "release" Docker image please see 3 # https://github.com/tinygo-org/docker 4 # 5 name: Docker 6 on: 7 push: 8 branches: [ dev, fix-docker-llvm-build ] 9 10 concurrency: 11 group: ${{ github.workflow }}-${{ github.ref }} 12 cancel-in-progress: true 13 14 jobs: 15 push_to_registry: 16 name: build-push-dev 17 runs-on: ubuntu-latest 18 permissions: 19 packages: write 20 contents: read 21 steps: 22 - name: Free Disk space 23 shell: bash 24 run: | 25 df -h 26 sudo rm -rf /opt/hostedtoolcache 27 sudo rm -rf /usr/local/lib/android 28 sudo rm -rf /usr/share/dotnet 29 sudo rm -rf /opt/ghc 30 sudo rm -rf /usr/local/graalvm 31 sudo rm -rf /usr/local/share/boost 32 df -h 33 - name: Check out the repo 34 uses: actions/checkout@v4 35 with: 36 submodules: recursive 37 - name: Set up Docker Buildx 38 uses: docker/setup-buildx-action@v3 39 - name: Docker meta 40 id: meta 41 uses: docker/metadata-action@v5 42 with: 43 images: | 44 tinygo/tinygo-dev 45 ghcr.io/${{ github.repository_owner }}/tinygo-dev 46 tags: | 47 type=sha,format=long 48 type=raw,value=latest 49 - name: Log in to Docker Hub 50 uses: docker/login-action@v3 51 with: 52 username: ${{ secrets.DOCKER_HUB_USERNAME }} 53 password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} 54 - name: Log in to Github Container Registry 55 uses: docker/login-action@v3 56 with: 57 registry: ghcr.io 58 username: ${{ github.actor }} 59 password: ${{ secrets.GITHUB_TOKEN }} 60 - name: Build and push 61 uses: docker/build-push-action@v5 62 with: 63 context: . 64 push: true 65 tags: ${{ steps.meta.outputs.tags }} 66 labels: ${{ steps.meta.outputs.labels }} 67 cache-from: type=gha 68 cache-to: type=gha,mode=max 69 - name: Trigger Drivers repo build on Github Actions 70 run: | 71 curl -X POST \ 72 -H "Authorization: Bearer ${{secrets.GHA_ACCESS_TOKEN}}" \ 73 -H "Accept: application/vnd.github.v3+json" \ 74 https://api.github.com/repos/tinygo-org/drivers/actions/workflows/build.yml/dispatches \ 75 -d '{"ref": "dev"}' 76 - name: Trigger Bluetooth repo build on Github Actions 77 run: | 78 curl -X POST \ 79 -H "Authorization: Bearer ${{secrets.GHA_ACCESS_TOKEN}}" \ 80 -H "Accept: application/vnd.github.v3+json" \ 81 https://api.github.com/repos/tinygo-org/bluetooth/actions/workflows/linux.yml/dispatches \ 82 -d '{"ref": "dev"}' 83 - name: Trigger TinyFS repo build on Github Actions 84 run: | 85 curl -X POST \ 86 -H "Authorization: Bearer ${{secrets.GHA_ACCESS_TOKEN}}" \ 87 -H "Accept: application/vnd.github.v3+json" \ 88 https://api.github.com/repos/tinygo-org/tinyfs/actions/workflows/build.yml/dispatches \ 89 -d '{"ref": "dev"}' 90 - name: Trigger TinyFont repo build on Github Actions 91 run: | 92 curl -X POST \ 93 -H "Authorization: Bearer ${{secrets.GHA_ACCESS_TOKEN}}" \ 94 -H "Accept: application/vnd.github.v3+json" \ 95 https://api.github.com/repos/tinygo-org/tinyfont/actions/workflows/build.yml/dispatches \ 96 -d '{"ref": "dev"}' 97 - name: Trigger TinyDraw repo build on Github Actions 98 run: | 99 curl -X POST \ 100 -H "Authorization: Bearer ${{secrets.GHA_ACCESS_TOKEN}}" \ 101 -H "Accept: application/vnd.github.v3+json" \ 102 https://api.github.com/repos/tinygo-org/tinydraw/actions/workflows/build.yml/dispatches \ 103 -d '{"ref": "dev"}' 104 - name: Trigger TinyTerm repo build on Github Actions 105 run: | 106 curl -X POST \ 107 -H "Authorization: Bearer ${{secrets.GHA_ACCESS_TOKEN}}" \ 108 -H "Accept: application/vnd.github.v3+json" \ 109 https://api.github.com/repos/tinygo-org/tinyterm/actions/workflows/build.yml/dispatches \ 110 -d '{"ref": "dev"}'