|
1 | 1 | name: Build Docker Image
|
2 | 2 | on:
|
3 | 3 | push:
|
4 |
| - branches: |
5 |
| - - latest |
6 | 4 | paths:
|
7 | 5 | - Dockerfile
|
8 | 6 | - .github/workflows/docker.yml
|
@@ -50,31 +48,31 @@ jobs:
|
50 | 48 | context: .
|
51 | 49 | file: ./Dockerfile
|
52 | 50 | platforms: linux/amd64,linux/arm64 #,linux/amd64/v2,linux/amd64/v3,linux/amd64/v4,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6
|
53 |
| - push: ${{ github.ref == 'refs/heads/develop' }} |
| 51 | + push: ${{ github.ref == 'refs/heads/latest' }} |
54 | 52 | tags: |
|
55 | 53 | ${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ github.ref_name }}
|
56 | 54 | ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ github.ref_name }}
|
57 | 55 | - name: show version
|
58 |
| - if: ${{ github.ref == 'refs/heads/develop' }} |
| 56 | + if: ${{ github.ref == 'refs/heads/latest' }} |
59 | 57 | run: |
|
60 | 58 | docker run --rm ${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ github.ref_name }} -V
|
61 | 59 | docker run --rm ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ github.ref_name }} -V
|
62 | 60 | - name: copy curl binary
|
63 |
| - if: ${{ github.ref == 'refs/heads/develop' }} |
| 61 | + if: ${{ github.ref == 'refs/heads/latest' }} |
64 | 62 | run: |
|
65 | 63 | docker run -d --pull always --platform amd64 --name curl-x86_64 ${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ github.ref_name }}
|
66 | 64 | docker cp curl-x86_64:/usr/local/bin/curl curl-x86_64
|
67 | 65 | docker run -d --pull always --platform arm64 --name curl-aarch64 ${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ github.ref_name }}
|
68 | 66 | docker cp curl-aarch64:/usr/local/bin/curl curl-aarch64
|
69 | 67 | - uses: actions/upload-artifact@v3
|
70 |
| - if: ${{ github.ref == 'refs/heads/develop' }} |
| 68 | + if: ${{ github.ref == 'refs/heads/latest' }} |
71 | 69 | with:
|
72 | 70 | name: artifacts
|
73 | 71 | path: |
|
74 | 72 | curl-x86_64
|
75 | 73 | curl-aarch64
|
76 | 74 | - uses: "marvinpinto/action-automatic-releases@latest"
|
77 |
| - if: ${{ github.ref == 'refs/heads/develop' }} |
| 75 | + if: ${{ github.ref == 'refs/heads/latest' }} |
78 | 76 | with:
|
79 | 77 | prerelease: false
|
80 | 78 | repo_token: ${{ github.token }}
|
|
0 commit comments