|
1 | | -name: Release Docker Image |
2 | | - |
3 | | -on: |
4 | | - release: |
5 | | - types: [ published ] |
6 | | - push: |
7 | | - branches: |
8 | | - - main |
9 | | - |
10 | | -concurrency: |
11 | | - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} |
12 | | - cancel-in-progress: true |
13 | | - |
14 | | -jobs: |
15 | | - consecutiveness: |
16 | | - runs-on: ubuntu-latest |
17 | | - steps: |
18 | | - - uses: ignite/consecutive-workflow-action@main |
19 | | - with: |
20 | | - token: ${{ secrets.GITHUB_TOKEN }} |
21 | | - |
22 | | - docker: |
23 | | - name: Push Docker image to Docker Hub |
24 | | - runs-on: ubuntu-latest |
25 | | - needs: [ consecutiveness ] |
26 | | - |
27 | | - steps: |
28 | | - - name: Check out the repo |
29 | | - uses: actions/checkout@v3 |
30 | | - |
31 | | - - name: Set up QEMU |
32 | | - uses: docker/setup-qemu-action@v1 |
33 | | - |
34 | | - - name: Set up Docker Buildx |
35 | | - uses: docker/setup-buildx-action@v1 |
36 | | - |
37 | | - - name: Login to DockerHub |
38 | | - uses: docker/login-action@v2 |
39 | | - with: |
40 | | - username: ${{ secrets.DOCKERHUB_USERNAME }} |
41 | | - password: ${{ secrets.DOCKERHUB_TOKEN }} |
42 | | - |
43 | | - - name: Docker meta |
44 | | - id: meta |
45 | | - uses: docker/metadata-action@v4 |
46 | | - with: |
47 | | - images: ignitehq/cli |
48 | | - # push to ignitehq/cli:latest on every push to master |
49 | | - # push to ignitehq/cli:vx.x.x on every release published |
50 | | - tags: | |
51 | | - type=raw,value=latest |
52 | | - type=semver,pattern=v{{version}} |
53 | | -
|
54 | | - - name: Build and push |
55 | | - uses: docker/build-push-action@v3 |
56 | | - with: |
57 | | - push: true |
58 | | - context: . |
59 | | - platforms: linux/amd64,linux/arm64 |
60 | | - tags: ${{ steps.meta.outputs.tags }} |
61 | | - labels: ${{ steps.meta.outputs.labels }} |
| 1 | +#name: Release Docker Image |
| 2 | + |
| 3 | +#on: |
| 4 | + #release: |
| 5 | + #types: [ published ] |
| 6 | + #push: |
| 7 | + #branches: |
| 8 | + #- main |
| 9 | + |
| 10 | +#concurrency: |
| 11 | + #group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} |
| 12 | + #cancel-in-progress: true |
| 13 | + |
| 14 | +#jobs: |
| 15 | + #consecutiveness: |
| 16 | + #runs-on: ubuntu-latest |
| 17 | + #steps: |
| 18 | + #- uses: ignite/consecutive-workflow-action@main |
| 19 | + #with: |
| 20 | + #token: ${{ secrets.GITHUB_TOKEN }} |
| 21 | + |
| 22 | + #docker: |
| 23 | + #name: Push Docker image to Docker Hub |
| 24 | + #runs-on: ubuntu-latest |
| 25 | + #needs: [ consecutiveness ] |
| 26 | + |
| 27 | + #steps: |
| 28 | + #- name: Check out the repo |
| 29 | + #uses: actions/checkout@v3 |
| 30 | + |
| 31 | + #- name: Set up QEMU |
| 32 | + #uses: docker/setup-qemu-action@v1 |
| 33 | + |
| 34 | + #- name: Set up Docker Buildx |
| 35 | + #uses: docker/setup-buildx-action@v1 |
| 36 | + |
| 37 | + #- name: Login to DockerHub |
| 38 | + #uses: docker/login-action@v2 |
| 39 | + #with: |
| 40 | + #username: ${{ secrets.DOCKERHUB_USERNAME }} |
| 41 | + #password: ${{ secrets.DOCKERHUB_TOKEN }} |
| 42 | + |
| 43 | + #- name: Docker meta |
| 44 | + #id: meta |
| 45 | + #uses: docker/metadata-action@v4 |
| 46 | + #with: |
| 47 | + #images: ignitehq/cli |
| 48 | + ## push to ignitehq/cli:latest on every push to master |
| 49 | + ## push to ignitehq/cli:vx.x.x on every release published |
| 50 | + #tags: | |
| 51 | + #type=raw,value=latest |
| 52 | + #type=semver,pattern=v{{version}} |
| 53 | + |
| 54 | + #- name: Build and push |
| 55 | + #uses: docker/build-push-action@v3 |
| 56 | + #with: |
| 57 | + #push: true |
| 58 | + #context: . |
| 59 | + #platforms: linux/amd64,linux/arm64 |
| 60 | + #tags: ${{ steps.meta.outputs.tags }} |
| 61 | + #labels: ${{ steps.meta.outputs.labels }} |
62 | 62 |
|
0 commit comments