|
63 | 63 | name: testimage
|
64 | 64 | path: /tmp/test.tar
|
65 | 65 |
|
66 |
| - - name: Push Docker image |
67 |
| - uses: docker/build-push-action@v2.7.0 |
68 |
| - with: |
69 |
| - context: . |
70 |
| - push: ${{ github.event_name == 'release' }} |
71 |
| - tags: ${{ steps.meta.outputs.tags }} |
72 |
| - labels: ${{ steps.meta.outputs.labels }} |
73 |
| - |
74 | 66 | molecule:
|
75 | 67 | needs:
|
76 | 68 | - build
|
|
87 | 79 | docker load --input /tmp/test.tar
|
88 | 80 | docker image ls -a
|
89 | 81 |
|
90 |
| - - name: Test run Molecule from DockerHub latest image |
91 |
| - uses: docker://gofrolist/molecule:test |
92 |
| - with: |
93 |
| - molecule_options: --version |
| 82 | + - name: Test run Molecule |
| 83 | + run: | |
| 84 | + docker run --rm ${{ env.DOCKER_IMAGE_NAME }}:test molecule --version |
94 | 85 |
|
95 | 86 | snyk:
|
96 | 87 | needs:
|
@@ -125,3 +116,45 @@ jobs:
|
125 | 116 | uses: github/codeql-action/upload-sarif@v1
|
126 | 117 | with:
|
127 | 118 | sarif_file: snyk.sarif
|
| 119 | + |
| 120 | + release: |
| 121 | + needs: |
| 122 | + - build |
| 123 | + - molecule |
| 124 | + runs-on: ubuntu-20.04 |
| 125 | + steps: |
| 126 | + - name: Download artifact |
| 127 | + uses: actions/download-artifact@v2.0.10 |
| 128 | + with: |
| 129 | + name: testimage |
| 130 | + path: /tmp |
| 131 | + |
| 132 | + - name: Load image |
| 133 | + run: | |
| 134 | + docker load --input /tmp/test.tar |
| 135 | + docker image ls -a |
| 136 | +
|
| 137 | + - name: Push Docker image |
| 138 | + uses: docker/build-push-action@v2.7.0 |
| 139 | + with: |
| 140 | + context: . |
| 141 | + push: ${{ github.event_name == 'release' }} |
| 142 | + tags: ${{ steps.meta.outputs.tags }} |
| 143 | + labels: ${{ steps.meta.outputs.labels }} |
| 144 | + cache-from: type=gha |
| 145 | + cache-to: type=gha,mode=max |
| 146 | + |
| 147 | + - name: Test run Molecule from DockerHub latest image |
| 148 | + uses: docker://gofrolist/molecule:latest |
| 149 | + with: |
| 150 | + molecule_options: --version |
| 151 | + |
| 152 | + - name: Setup Node.js |
| 153 | + uses: actions/setup-node@v2.3.2 |
| 154 | + with: |
| 155 | + node-version: '14' |
| 156 | + |
| 157 | + - name: Release |
| 158 | + env: |
| 159 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 160 | + run: npx semantic-release -p @semantic-release/commit-analyzer -p @semantic-release/release-notes-generator -p @semantic-release/github --dry-run |
0 commit comments