diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 86e40d9..75a456a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,16 +12,20 @@ on: branches: - 'main' +env: + IMAGE_BASE_NAME: 'throwtheswitch/madsciencelab' + + jobs: - build-and-push-images: + # Jobs organized for concurrent Docker image builds + + madsciencelab: runs-on: ubuntu-latest permissions: contents: read packages: write attestations: write id-token: write - env: - IMAGE_BASE_NAME: 'throwtheswitch/madsciencelab' steps: - name: 'Checkout GitHub Action' @@ -40,6 +44,8 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + # Docker image: madsciencelab + # Note: standard/ directory maps to madsciencelab image (no variants) - name: 'Build and push Docker image ${{ env.IMAGE_BASE_NAME }}:${{ github.ref_name }}' uses: docker/build-push-action@v6 with: @@ -49,9 +55,35 @@ jobs: push: ${{ github.event_name != 'pull_request' }} tags: ${{ env.IMAGE_BASE_NAME }}:${{ github.ref_name }}, ${{ env.IMAGE_BASE_NAME }}:latest + madsciencelab-plugins: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + attestations: write + id-token: write + env: + VARIANT: plugins + + steps: + - name: 'Checkout GitHub Action' + uses: actions/checkout@v4 + + - name: 'Set up QEMU' + uses: docker/setup-qemu-action@v3 + + - name: 'Set up Docker Buildx' + uses: docker/setup-buildx-action@v3 + + - name: 'Login to Docker Hub' + if: github.event_name != 'pull_request' + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + # Docker image: madsciencelab-plugins - name: 'Build and push Docker image ${{ env.IMAGE_BASE_NAME }}-${{ env.VARIANT }}:${{ github.ref_name }}' - env: - VARIANT: plugins uses: docker/build-push-action@v6 with: platforms: linux/amd64,linux/arm64 @@ -60,9 +92,35 @@ jobs: push: ${{ github.event_name != 'pull_request' }} tags: ${{ env.IMAGE_BASE_NAME }}-${{ env.VARIANT }}:${{ github.ref_name }}, ${{ env.IMAGE_BASE_NAME }}-${{ env.VARIANT }}:latest + madsciencelab-arm-none-eabi: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + attestations: write + id-token: write + env: + VARIANT: arm-none-eabi + + steps: + - name: 'Checkout GitHub Action' + uses: actions/checkout@v4 + + - name: 'Set up QEMU' + uses: docker/setup-qemu-action@v3 + + - name: 'Set up Docker Buildx' + uses: docker/setup-buildx-action@v3 + + - name: 'Login to Docker Hub' + if: github.event_name != 'pull_request' + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + # Docker image: madsciencelab-arm-none-eabi - name: 'Build and push Docker image ${{ env.IMAGE_BASE_NAME }}-${{ env.VARIANT }}:${{ github.ref_name }}' - env: - VARIANT: arm-none-eabi uses: docker/build-push-action@v6 with: platforms: linux/amd64,linux/arm64 @@ -71,9 +129,35 @@ jobs: push: ${{ github.event_name != 'pull_request' }} tags: ${{ env.IMAGE_BASE_NAME }}-${{ env.VARIANT }}:${{ github.ref_name }}, ${{ env.IMAGE_BASE_NAME }}-${{ env.VARIANT }}:latest + madsciencelab-arm-none-eabi-plugins: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + attestations: write + id-token: write + env: + VARIANT: arm-none-eabi-plugins + + steps: + - name: 'Checkout GitHub Action' + uses: actions/checkout@v4 + + - name: 'Set up QEMU' + uses: docker/setup-qemu-action@v3 + + - name: 'Set up Docker Buildx' + uses: docker/setup-buildx-action@v3 + + - name: 'Login to Docker Hub' + if: github.event_name != 'pull_request' + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + # Docker image: madsciencelab-arm-none-eabi-plugins - name: 'Build and push Docker image ${{ env.IMAGE_BASE_NAME }}-${{ env.VARIANT }}:${{ github.ref_name }}' - env: - VARIANT: arm-none-eabi-plugins uses: docker/build-push-action@v6 with: platforms: linux/amd64,linux/arm64 diff --git a/build/README.md b/build/README.md deleted file mode 100644 index e69de29..0000000