|
| 1 | +name: Nightly Publish |
| 2 | + |
| 3 | +permissions: |
| 4 | + contents: read |
| 5 | + packages: write |
| 6 | + |
| 7 | +on: |
| 8 | + push: |
| 9 | + branches: |
| 10 | + - master |
| 11 | + pull_request: |
| 12 | + branches: |
| 13 | + - master |
| 14 | + schedule: |
| 15 | + - cron: '0 0 * * *' |
| 16 | + |
| 17 | +jobs: |
| 18 | + build: |
| 19 | + runs-on: ubuntu-latest |
| 20 | + strategy: |
| 21 | + matrix: |
| 22 | + include: |
| 23 | +#VERSIONS |
| 24 | + - name: bullseye |
| 25 | + context: nightly/bullseye |
| 26 | + platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/386,linux/ppc64le,linux/s390x |
| 27 | + tags: | |
| 28 | + nightly-bullseye |
| 29 | + - name: slim-bullseye |
| 30 | + context: nightly/bullseye/slim |
| 31 | + platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/386,linux/ppc64le,linux/s390x |
| 32 | + tags: | |
| 33 | + nightly-bullseye-slim |
| 34 | + - name: bookworm |
| 35 | + context: nightly/bookworm |
| 36 | + platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/386,linux/ppc64le,linux/s390x |
| 37 | + tags: | |
| 38 | + nightly-bookworm |
| 39 | + nightly |
| 40 | + - name: slim-bookworm |
| 41 | + context: nightly/bookworm/slim |
| 42 | + platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/386,linux/ppc64le,linux/s390x |
| 43 | + tags: | |
| 44 | + nightly-bookworm-slim |
| 45 | + nightly-slim |
| 46 | + - name: alpine3.19 |
| 47 | + context: nightly/alpine3.19 |
| 48 | + platforms: linux/amd64,linux/arm64 |
| 49 | + tags: | |
| 50 | + nightly-alpine3.19 |
| 51 | + - name: alpine3.20 |
| 52 | + context: nightly/alpine3.20 |
| 53 | + platforms: linux/amd64,linux/arm64 |
| 54 | + tags: | |
| 55 | + nightly-alpine3.20 |
| 56 | + nightly-alpine |
| 57 | +#VERSIONS |
| 58 | + name: ${{ matrix.name }} |
| 59 | + steps: |
| 60 | + - uses: actions/checkout@v4 |
| 61 | + - uses: docker/setup-qemu-action@v3 |
| 62 | + - uses: docker/setup-buildx-action@v3 |
| 63 | + - uses: docker/login-action@v3 |
| 64 | + if: github.event_name != 'pull_request' |
| 65 | + with: |
| 66 | + registry: ghcr.io |
| 67 | + username: rust-lang |
| 68 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 69 | + |
| 70 | + - uses: docker/login-action@v3 |
| 71 | + if: github.event_name != 'pull_request' |
| 72 | + with: |
| 73 | + username: rustopsbot |
| 74 | + password: ${{ secrets.DOCKER_HUB_TOKEN }} |
| 75 | + |
| 76 | + - id: meta |
| 77 | + uses: docker/metadata-action@v5 |
| 78 | + with: |
| 79 | + images: | |
| 80 | + rustlang/rust |
| 81 | + ghcr.io/rust-lang/rust |
| 82 | + tags: ${{ matrix.tags }} |
| 83 | + |
| 84 | + - uses: docker/build-push-action@v5 |
| 85 | + with: |
| 86 | + context: ${{ matrix.context }} |
| 87 | + platforms: ${{ matrix.platforms }} |
| 88 | + push: ${{ github.event_name != 'pull_request' }} |
| 89 | + tags: ${{ steps.meta.outputs.tags }} |
| 90 | + labels: ${{ steps.meta.outputs.labels }} |
0 commit comments