|
27 | 27 | matrix:
|
28 | 28 | # for OCI runner change to: runner: [ubuntu-latest, self-hosted]
|
29 | 29 | runner: [ubuntu-latest]
|
30 |
| - os: [ubuntu2004, fedora33] |
| 30 | + os: [ubuntu2004, ubuntu1804, fedora33] |
31 | 31 |
|
32 | 32 | steps:
|
33 | 33 | - name: Checkout repository
|
|
45 | 45 | - name: Set up Docker Buildx
|
46 | 46 | uses: docker/setup-buildx-action@v1
|
47 | 47 |
|
48 |
| -# - name: Login to DockerHub |
49 |
| -# if: github.event_name != 'pull_request' |
50 |
| -# uses: docker/login-action@v1 |
51 |
| -# with: |
52 |
| -# username: ${{ secrets.DOCKERHUB_USERNAME }} |
53 |
| -# password: ${{ secrets.DOCKERHUB_TOKEN }} |
54 |
| - |
55 | 48 | - name: Login to GitHub Container Registry
|
56 | 49 | if: github.event_name != 'pull_request'
|
57 | 50 | uses: docker/login-action@v1
|
@@ -86,21 +79,20 @@ jobs:
|
86 | 79 | ./ipdk install ${{ matrix.os }}
|
87 | 80 | ipdk config IMAGE_NAME=ghcr.io/${{ github.repository_owner }}/ipdk-${{ matrix.os }}-${{ steps.system.outputs.arch }}
|
88 | 81 |
|
89 |
| - - name: IPDK image build and push |
90 |
| - if: github.event_name != 'pull_request' |
91 |
| - run: | |
92 |
| - ipdk build --no-cache \ |
93 |
| - --tags "${{ steps.image_meta.outputs.tags }}" \ |
94 |
| - --labels "${{ steps.image_meta.outputs.labels }}" \ |
95 |
| - --push |
96 |
| -
|
97 |
| - - name: IPDK image build and export |
98 |
| - if: github.event_name == 'pull_request' |
| 82 | + - name: IPDK image build and export or push |
99 | 83 | run: |
|
100 |
| - ipdk build --no-cache \ |
101 |
| - --tags "${{ steps.image_meta.outputs.tags }}" \ |
102 |
| - --labels "${{ steps.image_meta.outputs.labels }}" \ |
103 |
| - --export /tmp/${{ matrix.os }}-${{ steps.system.outputs.arch }}.tar |
| 84 | + echo "${{ github.event_name }}" |
| 85 | + if [ "${{ github.event_name }}" = "pull_request" ]; then |
| 86 | + ipdk build --no-cache \ |
| 87 | + --tags "${{ steps.image_meta.outputs.tags }}" \ |
| 88 | + --labels "${{ steps.image_meta.outputs.labels }}" \ |
| 89 | + --export /tmp/${{ matrix.os }}-${{ steps.system.outputs.arch }}.tar |
| 90 | + else |
| 91 | + ipdk build --no-cache \ |
| 92 | + --tags "${{ steps.image_meta.outputs.tags }}" \ |
| 93 | + --labels "${{ steps.image_meta.outputs.labels }}" \ |
| 94 | + --push |
| 95 | + fi |
104 | 96 |
|
105 | 97 | - name: Upload build artifact
|
106 | 98 | if: github.event_name == 'pull_request'
|
|
0 commit comments