diff --git a/.github/actions/before-release/action.yaml b/.github/actions/before-release/action.yaml new file mode 100644 index 0000000..97bc088 --- /dev/null +++ b/.github/actions/before-release/action.yaml @@ -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 diff --git a/.github/workflows/development-build.yaml b/.github/workflows/development-build.yaml index 236c949..ca71864 100644 --- a/.github/workflows/development-build.yaml +++ b/.github/workflows/development-build.yaml @@ -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 diff --git a/.github/workflows/integration-tests.yaml b/.github/workflows/integration-tests.yaml index 0d6e638..accf541 100644 --- a/.github/workflows/integration-tests.yaml +++ b/.github/workflows/integration-tests.yaml @@ -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 diff --git a/.github/workflows/release-version.yaml b/.github/workflows/release-version.yaml index e0b25e9..2e028b3 100644 --- a/.github/workflows/release-version.yaml +++ b/.github/workflows/release-version.yaml @@ -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