2021-05-21 15:45:01 +00:00
|
|
|
name: Builds
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
types: [opened, synchronize]
|
|
|
|
paths-ignore:
|
|
|
|
- '**/*.md'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build_cli:
|
|
|
|
name: Build CLI
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Setup Go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
2022-05-13 12:21:50 +00:00
|
|
|
go-version: 1.17
|
2021-05-21 15:45:01 +00:00
|
|
|
|
|
|
|
- name: Restore Go modules from cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: /home/runner/go/pkg/mod
|
|
|
|
key: deps-${{ hashFiles('go.sum') }}
|
|
|
|
|
2022-05-25 15:17:23 +00:00
|
|
|
- name: Get tree-service client
|
|
|
|
run: make sync-tree
|
|
|
|
|
2021-05-21 15:45:01 +00:00
|
|
|
- name: Update Go modules
|
|
|
|
run: make dep
|
|
|
|
|
|
|
|
- name: Build CLI
|
|
|
|
run: make
|
|
|
|
|
|
|
|
- name: Save binary
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2022-05-25 15:21:34 +00:00
|
|
|
name: neofs-s3-gw
|
|
|
|
path: bin/neofs-s3-gw
|
2021-05-21 15:45:01 +00:00
|
|
|
|
|
|
|
build_image:
|
|
|
|
needs: build_cli
|
|
|
|
name: Build Docker image
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
2022-05-13 12:21:50 +00:00
|
|
|
go-version: 1.17
|
2021-05-21 15:45:01 +00:00
|
|
|
|
|
|
|
- name: Restore Go modules from cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: /home/runner/go/pkg/mod
|
|
|
|
key: deps-${{ hashFiles('go.sum') }}
|
|
|
|
|
2022-05-25 15:17:23 +00:00
|
|
|
- name: Get tree-service client
|
|
|
|
run: make sync-tree
|
|
|
|
|
2021-05-21 15:45:01 +00:00
|
|
|
- name: Update Go modules
|
|
|
|
run: make dep
|
|
|
|
|
|
|
|
- name: Build Docker image
|
|
|
|
run: make image
|