Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@ 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@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6

- name: Install and login with up
if: env.UP_API_TOKEN != '' && env.UP_ORG != ''
Expand All @@ -32,9 +33,10 @@ jobs:

# doesn't work with plain token when pushing otherwise
- name: Login to xpkg with robot
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4
if: env.UP_API_TOKEN != '' && env.UP_ROBOT_ID != ''
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4
with:
registry: xpkg.upbound.io
registry: ${{ env.XPKG_REGISTRY }}
username: ${{ env.UP_ROBOT_ID }}
password: ${{ env.UP_API_TOKEN }}

Expand All @@ -46,3 +48,10 @@ jobs:
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}
4 changes: 2 additions & 2 deletions .github/workflows/composition-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- name: Checkout
id: checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6

- name: Install up
uses: upbound/action-up@53fe6395637d884c80d2bbc8c2d75d0ece776ced # v1
Expand All @@ -23,4 +23,4 @@ jobs:
run: up project build

- name: Run composition tests
run: up test run tests/test-*
run: up test run tests/*
14 changes: 3 additions & 11 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,10 @@ on:
- labeled

env:
# Build functions one at a time. Every Python function build mounts the same
# up-python-sdk-pip-cache Docker volume, and on a fresh runner - where that volume starts
# empty - concurrent builds race creating its directories and fail with
# "mkdir ...: file exists".
UP_MAX_CONCURRENCY: "1"
UP_API_TOKEN: ${{ secrets.UP_E2E_API_TOKEN || secrets.UP_API_TOKEN }}
UP_ORG: ${{ secrets.UP_E2E_ORG || secrets.UP_ORG }}
UP_GROUP: ${{ secrets.UP_E2E_GROUP || secrets.UP_GROUP || 'default' }}
UP_ROBOT_ID: ${{ secrets.UP_E2E_ROBOT_ID || secrets.UP_ROBOT_ID }}
# The space the e2e control plane is created in. Read by tests/e2etest-environment, which
# derives the Spaces API host from it, so this and the `up ctx` step below cannot drift.
UP_SPACE: ${{ secrets.UP_E2E_SPACE || 'upbound-gcp-us-central-1' }}

jobs:
e2e:
Expand All @@ -30,7 +22,7 @@ jobs:
steps:
- name: Checkout
id: checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
ref: ${{ github.event.pull_request.head.sha }}

Expand All @@ -43,7 +35,7 @@ jobs:

# doesn't work with plain token when pushing otherwise
- name: Login to xpkg with robot
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4
with:
registry: xpkg.upbound.io
username: ${{ env.UP_ROBOT_ID }}
Expand All @@ -53,7 +45,7 @@ jobs:
run: up project build

- name: Switch up context
run: up ctx ${{ env.UP_ORG }}/${{ env.UP_SPACE }}/${{ env.UP_GROUP }}
run: up ctx ${{ env.UP_ORG }}/upbound-gcp-us-central-1/${{ env.UP_GROUP }}

- name: Run e2e tests
run: up test run tests/* --e2e
2 changes: 1 addition & 1 deletion .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6

- name: Create Tag
uses: negz/create-tag@39bae1e0932567a58c20dea5a1a0d18358503320 # v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/yamllint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
name: runner / yamllint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: yamllint
uses: reviewdog/action-yamllint@f01d8a48fd8d89f89895499fca2cff09f9e9e8c0 # v1.21.0
with:
Expand Down
3 changes: 1 addition & 2 deletions .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ rules:
line-length: disable
document-start: disable
indentation:
spaces: consistent
indent-sequences: false
indent-sequences: consistent
Loading