Skip to content

set annotation on sync kapp.k14s.io/change-group: tanzu-sync #23

set annotation on sync kapp.k14s.io/change-group: tanzu-sync

set annotation on sync kapp.k14s.io/change-group: tanzu-sync #23

name: tap-operator CI
env:
IMAGE_NAME_CP: ${{ github.repository }}-copy-packages
IMAGE_NAME_OPERATOR: ${{ github.repository }}
REGISTRY: ghcr.io
on:
push:
# tags:
# - "v*"
jobs:
build-tap-operator:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up JDK 21 for x64
uses: actions/setup-java@v3
with:
java-version: "21"
distribution: "temurin"
- name: Run the Maven verify phase
run: mvn --batch-mode --update-snapshots verify
- name: Log in to the container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5.3.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_OPERATOR }}
- name: Run the Maven spring-boot:build-image
run: mvn spring-boot:build-image -Dspring-boot.build-image.imageName=${{ steps.meta.outputs.tags }}
- name: Push Image
run: docker push ${{ steps.meta.outputs.tags }}
build-copy-packages-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: initialize carvel tools
uses: carvel-dev/setup-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- run: |
imgpkg version
kbld version
- name: Log in to the container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5.3.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_CP }}
- name: Build and push Docker image
uses: docker/build-push-action@v5.1.0
with:
context: copy-packages
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}