Skip to content

feat: separated CI workflow and added GoReleaser configuration to add release tags automated #6

feat: separated CI workflow and added GoReleaser configuration to add release tags automated

feat: separated CI workflow and added GoReleaser configuration to add release tags automated #6

Workflow file for this run

name: CI
on:
pull_request:
branches:
- main
paths-ignore:
- "**/*.md"
- "docs/**"
push:
branches:
- main
paths-ignore:
- "**/*.md"
- "docs/**"
concurrency:
group: ${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.ref) || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
jobs:
build-test:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5
with:
go-version-file: go.mod
- name: Build and Test
run: |
go mod tidy
go build ./...
go test -race -coverprofile=coverage.txt -v ./...
goreleaser-snapshot:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5
with:
go-version-file: go.mod
- uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6
with:
version: "~> v2"
args: build --clean --snapshot
build-plugin-test:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3
- name: Build plugin image
run: |
docker build -t swarm-external-secrets:test .
mkdir -p ./plugin/rootfs
docker create --name plugin-rootfs swarm-external-secrets:test
docker export plugin-rootfs | tar -x -C ./plugin/rootfs
docker rm plugin-rootfs
cp config.json ./plugin/
docker plugin create test-org/swarm-external-secrets:test ./plugin
docker plugin inspect test-org/swarm-external-secrets:test