0pens0 deploying #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Deploy to TP | |
run-name: ${{ github.actor }} deploying | |
on: | |
push: | |
branches: | |
- "dev" | |
jobs: | |
gitops-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Tanzu CLI | |
env: | |
TANZU_CLI_VERSION: ${{vars.TANZU_CLI_VERSION}} | |
run: | | |
curl -Lo tanzu-cli-linux-amd64.tar.gz https://github.com/vmware-tanzu/tanzu-cli/releases/download/${TANZU_CLI_VERSION}/tanzu-cli-linux-amd64.tar.gz | |
curl -Lo tanzu-cli-binaries-checksums.txt https://github.com/vmware-tanzu/tanzu-cli/releases/download/${TANZU_CLI_VERSION}/tanzu-cli-binaries-checksums.txt | |
if [ "$(cat tanzu-cli-binaries-checksums.txt | grep tanzu-cli-linux-amd64.tar.gz)" != "$(sha256sum tanzu-cli-linux-amd64.tar.gz)" ]; then echo "Checksum does not match"; exit 1; fi | |
tar -xf tanzu-cli-linux-amd64.tar.gz | |
mv ${TANZU_CLI_VERSION}/tanzu-cli-linux_amd64 /usr/local/bin/tanzu | |
tanzu ceip-participation set false | |
tanzu config eula accept | |
tanzu init | |
tanzu version | |
tanzu plugin install build | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Build | |
env: | |
TANZU_API_TOKEN: ${{ secrets.API_TOKEN }} | |
run: | | |
tanzu login --endpoint ${{ vars.API_ENDPOINT }} | |
tanzu build config --build-plan-source-type=file --build-plan-source conf/platform-config.yml --containerapp-registry ${{ vars.BUILD_REGISTRY_CONF }} | |
docker login ${{ vars.REGISTRY }} -u ${{ vars.REGISTRY_USER_NAME }} -p ${{ secrets.RERGISTRY_PASS }} | |
tanzu build -o .build-output-temp | |
- run: echo "🍏 This job's status is ${{ job.status }}." |