Skip to content

Commit

Permalink
[nc] adopt new gha-tools-action
Browse files Browse the repository at this point in the history
Signed-off-by: Nic Cheneweth <[email protected]>
  • Loading branch information
ncheneweth committed May 16, 2024
1 parent 72b854a commit 6659ebb
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 25 deletions.
24 changes: 24 additions & 0 deletions .github/actions/before-release/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# yamllint disable rule:line-length
---
name: setup environment

description: load values from 1password vault

inputs:

instance:
description: input value that can be used to control which actions are run
required: false
default: ""

runs:
using: "composite"

steps:

- name: run step if instance matches
uses: 1password/load-secrets-action@581a835fb51b8e7ec56b71cf2ffddd7e68bb25e0 # v2.0.0
with:
export-env: true
env:
SLACK_BOT_TOKEN: op://empc-lab/svc-slack/post-bot-token
2 changes: 1 addition & 1 deletion .github/workflows/development-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

static-code-analysis:
name: static code analysis
uses: ThoughtWorks-DPS/gha-tools-action/.github/workflows/static-code-analysis.yaml@a2c1ad42c5abeb5a348328cfaf29b7c901dc40a5 # v0.1.2
uses: ThoughtWorks-DPS/gha-tools-action/.github/workflows/static-code-analysis.yaml@main

integration-tests:
name: integration test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

steps:
- name: checkout code
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6

- name: Install 1Password CLI
uses: 1password/install-cli-action@143a85f84a90555d121cde2ff5872e393a47ab9f # v1.0.0
Expand Down
27 changes: 4 additions & 23 deletions .github/workflows/release-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,7 @@ jobs:

release-version:
name: release version
uses: ThoughtWorks-DPS/gha-tools-action/.github/workflows/release-version.yaml@a2c1ad42c5abeb5a348328cfaf29b7c901dc40a5 # v0.1.2

on-success:
name: notify new release version
if: success()
runs-on: ubuntu-latest

steps:

- name: Load gha-slack-bot token
uses: 1password/load-secrets-action@581a835fb51b8e7ec56b71cf2ffddd7e68bb25e0 # v2.0.0
with:
export-env: true
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
SLACK_BOT_TOKEN: op://empc-lab/svc-slack/gha-slack-bot-token

- name: Post new release message
uses: ThoughtWorks-DPS/common-actions/slack-bot@b7cf3979fa5745551c5a62afa5e8e07f75ffa687 # v0.1.0
with:
channel: lab-events
message: New release ThoughtWorks/1password-action
include-tag: true
uses: ThoughtWorks-DPS/gha-tools-action/.github/workflows/release-version.yaml@main
with:
before-release: true
release-message: New release ThoughtWorks-DPS/1password-action

0 comments on commit 6659ebb

Please sign in to comment.