Skip to content

Update module github.com/linode/linodego to v1.65.0 #89

Update module github.com/linode/linodego to v1.65.0

Update module github.com/linode/linodego to v1.65.0 #89

Workflow file for this run

name: e2e
on:
workflow_dispatch:
pull_request: # TODO: change this to pull_request_target so people don't need to set their own LINODE_TOKEN secret in their forks
types: [opened, reopened, synchronize, closed]
branches:
- '**'
permissions:
contents: read
pull-requests: read
actions: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
changes:
runs-on: ubuntu-latest
outputs:
# Expose matched filters as job 'src' output variable
paths: ${{ steps.filter.outputs.changes }}
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Harden Runner
uses: step-security/harden-runner@v2
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
github.com:443
- uses: dorny/paths-filter@v3
id: filter
with:
filters: .github/filters.yml
e2e:
needs: changes
if: (github.event.action != 'closed' && contains(fromJSON(needs.changes.outputs.paths), 'src')) || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
timeout-minutes: 60
env:
LINODE_TOKEN: ${{ secrets.LINODE_TOKEN }}
LINODE_CLI_TOKEN: ${{ secrets.LINODE_TOKEN }}
LINODE_REGION: us-sea
CLUSTER_NAME: karpl-${{ github.event.pull_request.number && format('pr-{0}', github.event.pull_request.number) || format('manual-{0}', github.run_id) }}
KUBECONFIG: ${{ github.event.pull_request.number && format('pr-{0}-kubeconfig', github.event.pull_request.number) || format('manual-{0}-kubeconfig', github.run_id) }}
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
check-latest: true
- name: Install linode-cli
run: pipx install linode-cli==5.65.0
- name: Install devbox
uses: jetify-com/devbox-install-action@v0.14.0
with:
enable-cache: 'true'
refresh-cli: 'false'
- name: Run E2E
run: |
devbox run setup-and-test-e2e
cleanup:
if: github.event.action == 'closed' || github.event_name == 'workflow_dispatch'
timeout-minutes: 20
runs-on: ubuntu-latest
env:
LINODE_TOKEN: ${{ secrets.LINODE_TOKEN }}
LINODE_CLI_TOKEN: ${{ secrets.LINODE_TOKEN }}
CLUSTER_NAME: karpl-${{ github.event.pull_request.number && format('pr-{0}', github.event.pull_request.number) || format('manual-{0}', github.run_id) }}
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
- name: Install linode-cli
run: pipx install linode-cli==5.65.0
- name: Install devbox
uses: jetify-com/devbox-install-action@v0.14.0
with:
enable-cache: 'true'
refresh-cli: 'false'
- name: Delete LKE cluster for this PR
run: devbox run destroy-lke-cluster $(devbox run get-lke-cluster-id)