From 27d53954b8bb2aa9cd73d696a377928eb1dda4ab Mon Sep 17 00:00:00 2001 From: Chris Dostert Date: Thu, 30 May 2024 00:52:46 +0000 Subject: [PATCH] chore) Re-run bootstrap --- .github/workflows/build.yml | 15 +++++++++++++++ .opspec/build/op.yml | 15 ++------------- .opspec/provision-image/op.yml | 29 ++++++++++++++--------------- .opspec/release/op.yml | 25 ++++++++----------------- .opspec/test/op.yml | 8 ++------ README.md | 27 +++++++++++---------------- 6 files changed, 52 insertions(+), 67 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..dd01830 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,15 @@ +name: build + +on: push + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + + - name: Install Opctl + run: curl -L https://github.com/opctl/opctl/releases/download/0.1.45/opctl0.1.45.linux.tgz | sudo tar -xzv -C /usr/local/bin + + - name: Build + run: opctl run build \ No newline at end of file diff --git a/.opspec/build/op.yml b/.opspec/build/op.yml index 45edf79..cbca011 100644 --- a/.opspec/build/op.yml +++ b/.opspec/build/op.yml @@ -1,21 +1,10 @@ name: build description: builds the op -inputs: - srcDir: - dir: - default: . -outputs: - srcDir: - dir: {} -opspec: 0.1.6 run: serial: - op: ref: test - inputs: { srcDir } - op: - ref: github.com/opspec-pkgs/_.op.bootstrap#2.2.0 + ref: github.com/opspec-pkgs/_.op.bootstrap#4.0.1 inputs: - srcDir: - outputs: - srcDir: \ No newline at end of file + srcDir: $(../..) \ No newline at end of file diff --git a/.opspec/provision-image/op.yml b/.opspec/provision-image/op.yml index ba20fda..d4a3e87 100644 --- a/.opspec/provision-image/op.yml +++ b/.opspec/provision-image/op.yml @@ -1,31 +1,29 @@ name: provision-image description: | - Provisions image for the op to [opspecpkgs docker hub org](https://hub.docker.com/u/opspecpkgs) w/ name `opspecpkgs/$(opDotYml.name):${opDotYml.version}`. + Provisions image for the op to [opspec-pkgs image registry](https://github.com/orgs/opspec-pkgs/packages) w/ name `$(opDotYml.name):${opDotYml.version}`. > Before first use, a Dockerfile MUST be added to `.opspec/provision-image` inputs: - dockerUsername: + githubUsername: string: constraints: { minLength: 1 } - description: user for logging in to docker hub - dockerPassword: + description: user for logging in to github + githubAccessToken: string: constraints: { minLength: 1 } - description: password for logging in to docker hub + description: accessToken for logging in to github isSecret: true - srcDir: - dir: - default: . -opspec: 0.1.6 run: serial: - op: ref: github.com/opspec-pkgs/yaml.parse#1.0.0 - inputs: { yaml: $(srcDir/op.yml) } - outputs: { opDotYml: result } + inputs: + yaml: $(../../op.yml) + outputs: + result: $(opDotYml) - container: image: { ref: 'alpine:3.6' } - cmd: [sh, -ce, 'echo -n opspecpkgs/${opName#*/*/}:$(opDotYml.version) > /imageName'] + cmd: [sh, -ce, 'echo -n ghcr.io/opspec-pkgs/${opName#*/*/}:$(opDotYml.version) > /imageName'] envVars: opName: $(opDotYml.name) files: @@ -33,7 +31,7 @@ run: - op: ref: github.com/opspec-pkgs/docker.image.build#2.1.0 inputs: - dockerfile: $(/Dockerfile) + dockerfile: $(./Dockerfile) imageName: outputs: { imageTar } - op: @@ -41,5 +39,6 @@ run: inputs: imageTar: imageName: - username: $(dockerUsername) - password: $(dockerPassword) + registry: ghcr.io + username: $(githubUsername) + password: $(githubAccessToken) diff --git a/.opspec/release/op.yml b/.opspec/release/op.yml index 365f1ff..b03531c 100644 --- a/.opspec/release/op.yml +++ b/.opspec/release/op.yml @@ -5,33 +5,24 @@ inputs: string: constraints: { minLength: 1 } description: user for logging in to github - githubPassword: + githubAccessToken: string: constraints: { minLength: 1 } - description: password for logging in to github + description: accessToken for logging in to github isSecret: true - srcDir: - dir: - default: . -outputs: - srcDir: - dir: {} -opspec: 0.1.6 run: serial: - op: ref: build - inputs: - srcDir: - outputs: - srcDir: - op: ref: github.com/opspec-pkgs/yaml.parse#1.0.0 - inputs: { yaml: $(srcDir/op.yml) } - outputs: { opDotYml: result } + inputs: + yaml: $(../../op.yml) + outputs: + result: $(opDotYml) - op: ref: github.com/opspec-pkgs/git.repo.resolve-commit#1.0.2 - inputs: { dotGitDir: $(srcDir/.git) } + inputs: { dotGitDir: $(../../.git) } outputs: { commit: } - container: image: { ref: 'alpine:3.6' } @@ -46,7 +37,7 @@ run: owner: opspec-pkgs repo: $(opRepo) loginUsername: $(githubUsername) - loginPassword: $(githubPassword) + loginPassword: $(githubAccessToken) tag: $(opDotYml.version) commitish: $(commit) name: $(opDotYml.version) \ No newline at end of file diff --git a/.opspec/test/op.yml b/.opspec/test/op.yml index e6a2dcd..e4ebee2 100644 --- a/.opspec/test/op.yml +++ b/.opspec/test/op.yml @@ -1,11 +1,7 @@ name: test description: tests the op -inputs: - srcDir: - dir: - default: . -opspec: 0.1.6 run: op: ref: github.com/opspec-pkgs/opspec.v0.1.6.op.validate#1.0.0 - inputs: { op: $(srcDir) } \ No newline at end of file + inputs: + op: $(../..) \ No newline at end of file diff --git a/README.md b/README.md index 59fa621..bfaa52a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.org/opspec-pkgs/postgresql.db.run.svg?branch=master)](https://travis-ci.org/opspec-pkgs/postgresql.db.run) +[![Build Status](https://github.com/opspec-pkgs/postgresql.db.run/workflows/build/badge.svg?branch=main)](https://github.com/opspec-pkgs/postgresql.db.run/actions?query=workflow%3Abuild+branch%3Amain) icon @@ -6,16 +6,12 @@ Runs a PostgeSQL database. -# Format - -the op uses [![opspec 0.1.6](https://img.shields.io/badge/opspec-0.1.6-brightgreen.svg?colorA=6b6b6b&colorB=fc16be)](https://opspec.io/0.1.6) definition format - # Example usage -## Install +## Visualize ```shell -opctl op install github.com/opspec-pkgs/postgresql.db.run#1.0.3 +opctl ui github.com/opspec-pkgs/postgresql.db.run#1.0.3 ``` ## Run @@ -30,19 +26,18 @@ opctl run github.com/opspec-pkgs/postgresql.db.run#1.0.3 op: ref: github.com/opspec-pkgs/postgresql.db.run#1.0.3 inputs: - # required - dbDataRootDir: - dbPassword: - dbSchema: - dbUsername: - ### optional; uncomment to override default(s) - # dbHostname: postgresql-db + dbDataRootDir: # 👈 required; provide a value + dbPassword: # 👈 required; provide a value + dbSchema: # 👈 required; provide a value + dbUsername: # 👈 required; provide a value + ## uncomment to override defaults + # dbHostname: "postgresql-db" ``` # Support join us on -[![Slack](https://opctl-slackin.herokuapp.com/badge.svg)](https://opctl-slackin.herokuapp.com/) +[![Slack](https://img.shields.io/badge/slack-opctl-E01563.svg)](https://join.slack.com/t/opctl/shared_invite/zt-51zodvjn-Ul_UXfkhqYLWZPQTvNPp5w) or [open an issue](https://github.com/opspec-pkgs/postgresql.db.run/issues) @@ -56,4 +51,4 @@ and [tagged](https://git-scm.com/book/en/v2/Git-Basics-Tagging); see # Contributing see -[project/CONTRIBUTING.md](https://github.com/opspec-pkgs/project/blob/master/CONTRIBUTING.md) +[project/CONTRIBUTING.md](https://github.com/opspec-pkgs/project/blob/main/CONTRIBUTING.md)