update s3 region for minio [nt] #348
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Bump, Build & Test | |
on: | |
workflow_dispatch: | |
repository_dispatch: | |
types: [build-test] | |
push: | |
branches: | |
- main | |
jobs: | |
bump: | |
if: "! contains(github.event.head_commit.message, '[skip ci]')" | |
runs-on: ubuntu-latest | |
outputs: | |
new_tag: ${{ steps.tag_version.outputs.new_tag }} | |
new_version: ${{ steps.tag_version.outputs.new_version }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Bump version and push tag | |
id: tag_version | |
uses: mathieudutour/github-tag-action@v6.0 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
custom_tag: ${{ github.event.inputs.tag }} | |
build-for-test: | |
if: "! (contains(github.event.head_commit.message, '[skip ci]') || contains(github.event.head_commit.message, '[bump]'))" | |
runs-on: [self-hosted, linux] | |
timeout-minutes: 15 | |
needs: [bump] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.client_payload.ref }} | |
- name: Set up GoLang | |
uses: actions/setup-go@v3 | |
with: | |
go-version: "1.20" | |
cache: false | |
# - uses: actions/cache@v3 | |
# with: | |
# path: ~/go/pkg/mod | |
# key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
# restore-keys: | | |
# ${{ runner.os }}-go- | |
- name: Build | |
env: | |
# VERSION: ${{ steps.get_version.outputs.VERSION }} | |
# VERSION: ${{ github.event.client_payload.version }} | |
VERSION: ${{ needs.bump.outputs.new_version }} | |
REF_NAME: ${{ github.ref_name }} | |
run: | | |
echo "VERSION -> $VERSION" | |
echo "REF_NAME -> $REF_NAME" | |
bash scripts/prep.gomod.sh | |
bash scripts/build.linux.sh $VERSION | |
test: | |
if: "! (contains(github.event.head_commit.message, '[skip ci]') || contains(github.event.head_commit.message, '[no test]') || contains(github.event.head_commit.message, '[nt]') || contains(github.event.head_commit.message, '[bump]'))" | |
needs: [build-for-test] | |
runs-on: [self-hosted, linux] | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Configure Environment | |
uses: flarco/envkey-action@main | |
with: | |
envkey: ${{ secrets.ENVKEY }} | |
- name: Set up GoLang | |
uses: actions/setup-go@v3 | |
with: | |
go-version: "1.20" | |
cache: false | |
- name: Run Go Tests | |
run: | | |
export DEBUG='' | |
bash scripts/prep.gomod.sh && bash scripts/test.sh |