Skip to content

Commit

Permalink
Merge pull request #68 from ConductorOne/ggreer/capabilities
Browse files Browse the repository at this point in the history
Upgrade go versions and action versions.
  • Loading branch information
ggreer authored Oct 2, 2024
2 parents 231ce4b + 647e439 commit fce431c
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 15 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/capabilities.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Generate connector capabilities

on:
push:
branches:
- main

jobs:
calculate-capabilities:
runs-on: ubuntu-latest
services:
openldap:
image: osixia/openldap:latest
ports:
- "389:389"
- "636:636"
env:
LDAP_ORGANISATION: example
LDAP_DOMAIN: example.org
LDAP_ADMIN_USERNAME: admin
LDAP_ADMIN_PASSWORD: admin
LDAP_CONFIG_PASSWORD: config_pass
LDAP_BASE_DN: "dc=example,dc=org"
BITNAMI_DEBUG: true
LDAP_REMOVE_CONFIG_AFTER_SETUP: false
LDAP_ENABLE_TLS: true
LDAP_LDAPS_PORT_NUMBER: 636
LDAP_TLS_CERT_FILE: /container/service/slapd/assets/certs/ldap.crt
LDAP_TLS_KEY_FILE: /container/service/slapd/assets/certs/ldap.key
LDAP_TLS_CA_FILE: /container/service/slapd/assets/certs/ca.crt
LDAP_TLS_VERIFY_CLIENT: try

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.RELENG_GITHUB_TOKEN }}

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

- name: Build
run: go build -o connector ./cmd/baton-ldap

- name: Run and save output
env:
BATON_PASSWORD: admin
BATON_BASE_DN: 'dc=example,dc=org'
BATON_USER_DN: 'CN=admin,DC=example,DC=org'
BATON_URL: 'ldaps://localhost'
BATON_INSECURE_SKIP_VERIFY: true
run: ./connector capabilities > baton_capabilities.json

- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
message: 'Updating baton capabilities.'
add: 'baton_capabilities.json'
18 changes: 9 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.21.x
go-version: 1.22.x
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Run linters
uses: golangci/golangci-lint-action@v3
with:
Expand All @@ -24,17 +24,17 @@ jobs:
go-test:
strategy:
matrix:
go-version: [1.21.x]
go-version: [1.22.x]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
if: success()
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: go tests
run: go test -v -covermode=count -json ./... > test.json
- name: annotate go tests
Expand Down Expand Up @@ -73,11 +73,11 @@ jobs:
BATON_INSECURE_SKIP_VERIFY: true
steps:
- name: Install Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.21.x
go-version: 1.22.x
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup node.js
uses: actions/setup-node@v3
with:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ jobs:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.21.x
go-version: 1.22.x
- name: Set up Gon
run: brew tap conductorone/gon && brew install conductorone/gon/gon
- name: Import Keychain Certs
Expand All @@ -37,13 +37,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.21.x
go-version: 1.22.x
- name: Docker Login
uses: docker/login-action@v1
with:
Expand Down

0 comments on commit fce431c

Please sign in to comment.