Skip to content

Commit

Permalink
[nc] build using gha-tools-action@main
Browse files Browse the repository at this point in the history
Signed-off-by: Nic Cheneweth <[email protected]>
  • Loading branch information
ncheneweth committed May 17, 2024
1 parent 4ee90ab commit 65fc0a6
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 35 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: load slack-bot credentials
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
3 changes: 2 additions & 1 deletion .github/workflows/development-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ jobs:

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

integration-tests:
name: integration test
needs: static-code-analysis
uses: ./.github/workflows/integration-tests.yaml
secrets:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
7 changes: 1 addition & 6 deletions .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ permissions:

jobs:

static-code-analysis:
integration-tests:
name: action integration tests
runs-on: ubuntu-latest

Expand All @@ -27,11 +27,6 @@ jobs:
- name: checkout code
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5

- name: Install 1Password CLI
uses: 1password/install-cli-action@143a85f84a90555d121cde2ff5872e393a47ab9f # v1.0.0
with:
version: 2.27.0

- name: install base-image packages as Action
uses: ThoughtWorks-DPS/base-packages-action@main
with:
Expand Down
29 changes: 6 additions & 23 deletions .github/workflows/release-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,9 @@ jobs:

release-version:
name: release version
uses: ThoughtWorks-DPS/gha-tools-action/.github/workflows/release-version.yaml@0df0049e1a6ec78f1e58c7bd4be6bd5574abc820 # v0.1.4

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-DPS/base-packages-action
include-tag: true
uses: ThoughtWorks-DPS/gha-tools-action/.github/workflows/release-version.yaml@main
secrets:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
with:
release-message: New release ThoughtWorks-DPS/base-packages-action
before-release: true
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 ThoughtWorks EMPC NA Labs Team
Copyright (c) 2024 ThoughtWorks, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
# base-packages-action
Install base-image packages through an Action
<div align="center">
<p>
<img alt="Thoughtworks Logo" src="https://raw.githubusercontent.com/ThoughtWorks-DPS/static/master/thoughtworks_flamingo_wave.png?sanitize=true" width=200 /><br />
<img alt="DPS Title" src="https://raw.githubusercontent.com/ThoughtWorks-DPS/static/master/EMPCPlatformStarterKitsImage.png?sanitize=true" width=350/><br />
<h2>base-packages-action</h2>
<img alt="GitHub Actions Workflow Status" src="https://img.shields.io/github/actions/workflow/status/ThoughtWorks-DPS/base-packages-action/.github%2Fworkflows%2Fdevelopment-build.yaml"> <img alt="GitHub Release" src="https://img.shields.io/github/v/release/ThoughtWorks-DPS/base-packages-action"> <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/license-MIT-blue.svg"></a>
</p>
</div>

Install gha-container-base-image packages through an Action.
4 changes: 2 additions & 2 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
---
name: install

description: install gha-tools dependencies
description: install gha-container-base-image dependencies

inputs:

Expand Down Expand Up @@ -32,7 +32,7 @@ runs:
steps:
- name: Install 1Password CLI
if: ${{ inputs.op-version != '' }}
uses: 1password/install-cli-action@v1
uses: 1password/install-cli-action@143a85f84a90555d121cde2ff5872e393a47ab9f # v1.0.0
with:
version: ${{ inputs.op-version }}

Expand Down

0 comments on commit 65fc0a6

Please sign in to comment.