|
| 1 | +name: docker-3.1dev |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - 3.1dev |
| 7 | + workflow_dispatch: |
| 8 | + schedule: |
| 9 | + - cron: "0 8 * * 1" |
| 10 | + |
| 11 | +env: |
| 12 | + BUILD_VERSION: "3.1dev" |
| 13 | + DOCKER_CLI_EXPERIMENTAL: enabled |
| 14 | + |
| 15 | +jobs: |
| 16 | + |
| 17 | + deploy: |
| 18 | + runs-on: ubuntu-20.04 |
| 19 | + |
| 20 | + steps: |
| 21 | + - name: Source checkout |
| 22 | + uses: actions/checkout@v3 |
| 23 | + |
| 24 | + - name: Setup QEMU |
| 25 | + id: qemu |
| 26 | + uses: docker/setup-qemu-action@v2.2.0 |
| 27 | + |
| 28 | + - name: Setup Buildx |
| 29 | + id: buildx |
| 30 | + uses: docker/setup-buildx-action@v2 |
| 31 | + |
| 32 | + - name: Set Docker metadata |
| 33 | + id: docker_meta |
| 34 | + uses: docker/metadata-action@v4 |
| 35 | + with: |
| 36 | + images: ${{ github.repository }} |
| 37 | + labels: | |
| 38 | + org.opencontainers.image.version=${{ env.BUILD_VERSION }} |
| 39 | + org.opencontainers.image.revision=${{ github.sha }} |
| 40 | + org.opencontainers.image.title=${{ github.repository }} |
| 41 | +
|
| 42 | + - name: GitHub login |
| 43 | + if: ${{ github.event_name != 'pull_request' }} |
| 44 | + uses: docker/login-action@v2.2.0 |
| 45 | + with: |
| 46 | + registry: ghcr.io |
| 47 | + username: ${{ github.actor }} |
| 48 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 49 | + |
| 50 | + - name: Build and push |
| 51 | + uses: docker/build-push-action@v4.1.1 |
| 52 | + with: |
| 53 | + push: ${{ github.event_name != 'pull_request' }} |
| 54 | + context: . |
| 55 | + file: Dockerfile.git |
| 56 | + platforms: linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/arm/v6,linux/ppc64le |
| 57 | + build-args: BUILD_VERSION |
| 58 | + cache-from: type=gha, scope=${{ github.workflow }} |
| 59 | + cache-to: type=gha, scope=${{ github.workflow }} |
| 60 | + labels: ${{ steps.docker_meta.outputs.labels }} |
| 61 | + tags: | |
| 62 | + ghcr.io/${{ github.repository }}:${{ env.BUILD_VERSION }} |
| 63 | + ghcr.io/${{ github.repository }}:latest |
0 commit comments