|
12 | 12 | permissions: |
13 | 13 | contents: write |
14 | 14 | jobs: |
15 | | - Publish: # Pack and publish image to Docker Hub and Github Release |
| 15 | + Artifact: # Pack and publish to Github Artifact |
16 | 16 | runs-on: ubuntu-latest |
17 | 17 | container: |
18 | | - image: smartir/smart-ir-builder:v0.1.0 |
| 18 | + image: smartir/smart-ir-builder:main |
19 | 19 | steps: |
20 | 20 | - name: Checkout |
21 | 21 | uses: actions/checkout@v2 |
22 | 22 | with: |
23 | | - fetch-depth: 0 |
| 23 | + fetch-depth: 0 |
24 | 24 | - name: Build the Release |
25 | 25 | working-directory: ir_cli |
26 | 26 | run: | |
27 | | - rustup default 1.67 # verify problem |
| 27 | + rustup default 1.67 |
28 | 28 | make release |
29 | | - ls ./ # todo remove test |
30 | | - ls ./_build # todo remove test |
31 | | - ls ./_build/sir |
| 29 | + ls _build # there should be a ir.tgz file under the ir_cli/_build directory |
| 30 | + - name: Upload Artifact to Github Releases |
| 31 | + uses: actions/upload-artifact@v3 |
| 32 | + with: |
| 33 | + name: ir-linux-amd64-nightly |
| 34 | + path: ir_cli/_build/ir.tgz |
| 35 | + |
| 36 | + Docker: # Download from Github Artifact and build Docker image and push |
| 37 | + runs-on: ubuntu-latest |
| 38 | + needs: [Artifact] |
| 39 | + steps: |
| 40 | + - name: Checkout |
| 41 | + uses: actions/checkout@v2 |
| 42 | + with: |
| 43 | + fetch-depth: 0 |
| 44 | + - name: Download from Artifact |
| 45 | + uses: actions/download-artifact@v3 |
| 46 | + with: |
| 47 | + name: ir-linux-amd64-nightly |
| 48 | + path: tmp |
| 49 | + - name: Check downloaded contents |
| 50 | + run: | |
| 51 | + mkdir -p _build/sir |
| 52 | + tar -xf tmp/ir.tgz -C _build/sir |
| 53 | + ls _build/sir |
32 | 54 | - name: Login to Docker Hub |
33 | 55 | uses: docker/login-action@v2 |
34 | 56 | with: |
|
44 | 66 | with: |
45 | 67 | context: . |
46 | 68 | push: true # ${{ github.event_name != 'pull_request' }} |
47 | | - tags: v0.1.0 # ${{ steps.meta.outputs.tags }} |
| 69 | + tags: smartir/smartir:v0.1.0 # ${{ steps.meta.outputs.tags }} |
48 | 70 | labels: ${{ steps.meta.outputs.labels }} |
49 | | - - name: Upload Artifact to Github Releases |
50 | | - uses: actions/upload-artifact@v3 |
51 | | - with: |
52 | | - name: ir-linux-amd64-nightly |
53 | | - path: ir.tgz |
| 71 | + |
0 commit comments