|
| 1 | +name: release |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - v* |
| 7 | + |
| 8 | +env: |
| 9 | + CONTROLLER_IMAGE_NAME: ghcr.io/mrsupiri/lazy-koala/controller |
| 10 | + GAZER_IMAGE_NAME: ghcr.io/mrsupiri/lazy-koala/gazer |
| 11 | + INSPECTOR_IMAGE_NAME: ghcr.io/mrsupiri/lazy-koala/inspector |
| 12 | + SHERLOCK_IMAGE_NAME: ghcr.io/mrsupiri/lazy-koala/sherlock |
| 13 | + DOCKER_BUILDKIT: 1 |
| 14 | + |
| 15 | +jobs: |
| 16 | + controller: |
| 17 | + runs-on: ubuntu-latest |
| 18 | + defaults: |
| 19 | + run: |
| 20 | + shell: bash |
| 21 | + working-directory: control-plane |
| 22 | + steps: |
| 23 | + - uses: actions/checkout@v2 |
| 24 | + - uses: docker/login-action@v1 |
| 25 | + with: |
| 26 | + registry: ghcr.io |
| 27 | + username: ${{ github.actor }} |
| 28 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 29 | + - name: Get Tag |
| 30 | + id: vars |
| 31 | + run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} |
| 32 | + - run: docker build -t $CONTROLLER_IMAGE_NAME:latest . |
| 33 | + - run: docker tag $CONTROLLER_IMAGE_NAME:latest $CONTROLLER_IMAGE_NAME:${{ steps.vars.outputs.tag }} |
| 34 | + - run: docker push $CONTROLLER_IMAGE_NAME --all-tags |
| 35 | + |
| 36 | + |
| 37 | + gazer: |
| 38 | + runs-on: ubuntu-latest |
| 39 | + defaults: |
| 40 | + run: |
| 41 | + shell: bash |
| 42 | + working-directory: gazer |
| 43 | + steps: |
| 44 | + - uses: actions/checkout@v2 |
| 45 | + - uses: docker/login-action@v1 |
| 46 | + with: |
| 47 | + registry: ghcr.io |
| 48 | + username: ${{ github.actor }} |
| 49 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 50 | + - name: Get Tag |
| 51 | + id: vars |
| 52 | + run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} |
| 53 | + - run: docker build -t $GAZER_IMAGE_NAME:latest . |
| 54 | + - run: docker tag $GAZER_IMAGE_NAME:latest $GAZER_IMAGE_NAME:${{ steps.vars.outputs.tag }} |
| 55 | + - run: docker push $GAZER_IMAGE_NAME --all-tags |
| 56 | + gazer-headers: |
| 57 | + runs-on: ubuntu-latest |
| 58 | + defaults: |
| 59 | + run: |
| 60 | + shell: bash |
| 61 | + working-directory: gazer/init-headers |
| 62 | + steps: |
| 63 | + - uses: actions/checkout@v2 |
| 64 | + - uses: docker/login-action@v1 |
| 65 | + with: |
| 66 | + registry: ghcr.io |
| 67 | + username: ${{ github.actor }} |
| 68 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 69 | + - name: Get Tag |
| 70 | + id: vars |
| 71 | + run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} |
| 72 | + - run: docker build -t $GAZER_IMAGE_NAME:init . |
| 73 | + - run: docker tag $GAZER_IMAGE_NAME:init $GAZER_IMAGE_NAME:init-${{ steps.vars.outputs.tag }} |
| 74 | + - run: docker push $GAZER_IMAGE_NAME --all-tags |
| 75 | + |
| 76 | + |
| 77 | + inspector: |
| 78 | + runs-on: ubuntu-latest |
| 79 | + defaults: |
| 80 | + run: |
| 81 | + shell: bash |
| 82 | + steps: |
| 83 | + - uses: actions/checkout@v2 |
| 84 | + - uses: docker/login-action@v1 |
| 85 | + with: |
| 86 | + registry: ghcr.io |
| 87 | + username: ${{ github.actor }} |
| 88 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 89 | + - name: Get Tag |
| 90 | + id: vars |
| 91 | + run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} |
| 92 | + - run: docker build -t $INSPECTOR_IMAGE_NAME:latest -f inspector/Dockerfile . |
| 93 | + - run: docker tag $INSPECTOR_IMAGE_NAME:latest $INSPECTOR_IMAGE_NAME:${{ steps.vars.outputs.tag }} |
| 94 | + - run: docker push $INSPECTOR_IMAGE_NAME --all-tags |
| 95 | + |
| 96 | + |
| 97 | + sherlock: |
| 98 | + runs-on: ubuntu-latest |
| 99 | + defaults: |
| 100 | + run: |
| 101 | + shell: bash |
| 102 | + working-directory: sherlock |
| 103 | + steps: |
| 104 | + - uses: actions/checkout@v2 |
| 105 | + - uses: docker/login-action@v1 |
| 106 | + with: |
| 107 | + registry: ghcr.io |
| 108 | + username: ${{ github.actor }} |
| 109 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 110 | + - name: Get Tag |
| 111 | + id: vars |
| 112 | + run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} |
| 113 | + - run: docker build -t $SHERLOCK_IMAGE_NAME:latest . |
| 114 | + - run: docker tag $SHERLOCK_IMAGE_NAME:latest $SHERLOCK_IMAGE_NAME:${{ steps.vars.outputs.tag }} |
| 115 | + - run: docker push $SHERLOCK_IMAGE_NAME --all-tags |
| 116 | + |
| 117 | + |
| 118 | + helm-chart: |
| 119 | + runs-on: ubuntu-latest |
| 120 | + steps: |
| 121 | + - uses: actions/checkout@v2 |
| 122 | + - run: helm package charts/lazy-koala -d dist/ |
0 commit comments