|
1 |
| -name: release-manual-docker |
| 1 | +# Trigger this workflow only to manually create a Docker release; this should only be used |
| 2 | +# in extraordinary circumstances, as Docker releases are normally created automatically as |
| 3 | +# part of the automated release workflow. |
2 | 4 |
|
3 |
| -# Use this only in extraordinary circumstances to manually create a Docker release. |
4 |
| -# A Docker release is normally created as part of the automated release workflow. |
| 5 | +name: release-manual-docker |
5 | 6 | on: workflow_dispatch
|
6 |
| - |
7 | 7 | env:
|
8 | 8 | REGISTRY: docker.io
|
9 | 9 | IMAGE_NAME: parseplatform/parse-dashboard
|
10 |
| - |
11 | 10 | jobs:
|
12 | 11 | build:
|
13 |
| - |
14 | 12 | runs-on: ubuntu-18.04
|
15 | 13 | permissions:
|
16 | 14 | contents: read
|
17 | 15 | packages: write
|
18 |
| - |
19 | 16 | steps:
|
20 | 17 | - name: Determine branch name
|
21 | 18 | id: branch
|
22 | 19 | run: echo "::set-output name=branch_name::${GITHUB_REF#refs/*/}"
|
23 |
| - |
24 | 20 | - name: Checkout repository
|
25 | 21 | uses: actions/checkout@v2
|
26 |
| - |
27 | 22 | - name: Set up QEMU
|
28 | 23 | id: qemu
|
29 | 24 | uses: docker/setup-qemu-action@v1
|
30 |
| - |
31 | 25 | - name: Set up Docker Buildx
|
32 | 26 | uses: docker/setup-buildx-action@v1
|
33 |
| - |
34 | 27 | - name: Log into Docker Hub
|
35 | 28 | if: github.event_name != 'pull_request'
|
36 | 29 | uses: docker/login-action@v1
|
37 | 30 | with:
|
38 | 31 | username: ${{ secrets.DOCKERHUB_USERNAME }}
|
39 | 32 | password: ${{ secrets.DOCKERHUB_TOKEN }}
|
40 |
| - |
41 | 33 | - name: Extract Docker metadata
|
42 | 34 | id: meta
|
43 | 35 | uses: docker/metadata-action@v3
|
44 | 36 | with:
|
45 | 37 | images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
46 | 38 | flavor: |
|
47 | 39 | latest=${{ steps.branch.outputs.branch_name == 'master' }}
|
48 |
| -
|
49 | 40 | - name: Build and push Docker image
|
50 | 41 | uses: docker/build-push-action@v2
|
51 | 42 | with:
|
|
0 commit comments