Skip to content

🔄 synced local '.github/workflows' with remote 'shared/configurations… #147

🔄 synced local '.github/workflows' with remote 'shared/configurations…

🔄 synced local '.github/workflows' with remote 'shared/configurations… #147

Workflow file for this run

name: CI
on:
push:
branches:
- main
workflow_dispatch:
inputs:
version:
description: Package version (e.g. v0.1.0)
required: false
env:
UP_API_TOKEN: ${{ secrets.UP_API_TOKEN }}
UP_ROBOT_ID: ${{ secrets.UP_ROBOT_ID }}
UP_ORG: ${{ secrets.UP_ORG }}
XPKG_REGISTRY: xpkg.upbound.io
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
id: checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- name: Install and login with up
if: env.UP_API_TOKEN != '' && env.UP_ORG != ''
uses: upbound/action-up@53fe6395637d884c80d2bbc8c2d75d0ece776ced # v1
with:
api-token: ${{ secrets.UP_API_TOKEN }}
organization: ${{ secrets.UP_ORG }}
# doesn't work with plain token when pushing otherwise
- name: Login to xpkg with robot
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3
with:
registry: ${{ env.XPKG_REGISTRY }}
username: ${{ env.UP_ROBOT_ID }}
password: ${{ env.UP_API_TOKEN }}
- name: Build and Push Upbound project
if: env.UP_API_TOKEN != ''
uses: upbound/action-up-project@b849ec1eb303ae4abf22b2b86c0e2afca155137b # v1
with:
push-project: true
tag: ${{ inputs.version || '' }}
# login-check does `up org list` which doesn't work with a robot-token
skip-login-check: true
- name: Append icon overlay to package
if: env.UP_API_TOKEN != '' && hashFiles('./extensions') != '' && inputs.version != ''
run: |
PROJECT_NAME=$(yq '.metadata.name' upbound.yaml)
PACKAGE_REF="${{ env.XPKG_REGISTRY }}/${{ env.UP_ORG }}/${PROJECT_NAME}:${{ inputs.version }}"
up alpha xpkg append --extensions-root=./extensions ${PACKAGE_REF}