fix: pipeline_fix #7
3 changed files with 33 additions and 16 deletions
27
.github/workflows/publish.yaml
vendored
27
.github/workflows/publish.yaml
vendored
|
|
@ -1,7 +1,12 @@
|
||||||
name: Publish
|
name: Publish
|
||||||
|
|
||||||
|
run-name: Publish by @${{ github.actor }}
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- alpha
|
||||||
|
- main
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
|
|
@ -42,10 +47,7 @@ jobs:
|
||||||
apt-get -y -qq update
|
apt-get -y -qq update
|
||||||
apt-get -y -qq install jq python3 python3-pip python-is-python3 s3cmd git make wget
|
apt-get -y -qq install jq python3 python3-pip python-is-python3 s3cmd git make wget
|
||||||
|
|
||||||
- name: Checkout
|
- name: Setup Go
|
||||||
uses: actions/checkout@v6
|
|
||||||
|
|
||||||
- name: Install Go ${{ env.GO_VERSION }}
|
|
||||||
uses: actions/setup-go@v6
|
uses: actions/setup-go@v6
|
||||||
with:
|
with:
|
||||||
go-version: ${{ env.GO_VERSION }}
|
go-version: ${{ env.GO_VERSION }}
|
||||||
|
|
@ -56,11 +58,15 @@ jobs:
|
||||||
go install github.com/hashicorp/terraform-plugin-codegen-framework/cmd/tfplugingen-framework@latest
|
go install github.com/hashicorp/terraform-plugin-codegen-framework/cmd/tfplugingen-framework@latest
|
||||||
go install github.com/hashicorp/terraform-plugin-codegen-openapi/cmd/tfplugingen-openapi@latest
|
go install github.com/hashicorp/terraform-plugin-codegen-openapi/cmd/tfplugingen-openapi@latest
|
||||||
|
|
||||||
- uses: actions/setup-java@v5
|
- name: Setup JAVA
|
||||||
|
uses: actions/setup-java@v5
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin' # See 'Supported distributions' for available options
|
distribution: 'temurin' # See 'Supported distributions' for available options
|
||||||
java-version: '21'
|
java-version: '21'
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Run build pkg directory
|
- name: Run build pkg directory
|
||||||
run: |
|
run: |
|
||||||
go run cmd/main.go build
|
go run cmd/main.go build
|
||||||
|
|
@ -81,7 +87,18 @@ jobs:
|
||||||
echo "${{ secrets.PRIVATE_KEY_PEM }}" > private.key.pem
|
echo "${{ secrets.PRIVATE_KEY_PEM }}" > private.key.pem
|
||||||
gpg --import private.key.pem
|
gpg --import private.key.pem
|
||||||
|
|
||||||
|
- name: Run GoReleaser with SNAPSHOT
|
||||||
|
if: github.event_name == 'workflow_dispatch'
|
||||||
|
id: goreleaser
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GPG_FINGERPRINT: ${{ secrets.GPG_FINGERPRINT }}
|
||||||
|
uses: goreleaser/goreleaser-action@v6
|
||||||
|
with:
|
||||||
|
args: release --skip publish --clean --snapshot
|
||||||
|
|
||||||
- name: Run GoReleaser
|
- name: Run GoReleaser
|
||||||
|
if: github.event_name != 'workflow_dispatch'
|
||||||
id: goreleaser
|
id: goreleaser
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
|
||||||
|
|
@ -19,20 +19,20 @@ builds:
|
||||||
ldflags:
|
ldflags:
|
||||||
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
|
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
|
||||||
goos:
|
goos:
|
||||||
- freebsd
|
# - freebsd
|
||||||
- windows
|
# - windows
|
||||||
- linux
|
- linux
|
||||||
- darwin
|
- darwin
|
||||||
goarch:
|
goarch:
|
||||||
- amd64
|
- amd64
|
||||||
- '386'
|
# - '386'
|
||||||
- arm
|
# - arm
|
||||||
- arm64
|
- arm64
|
||||||
ignore:
|
# ignore:
|
||||||
- goos: darwin
|
# - goos: darwin
|
||||||
goarch: '386'
|
# goarch: '386'
|
||||||
- goos: windows
|
# - goos: windows
|
||||||
goarch: arm
|
# goarch: arm
|
||||||
binary: '{{ .ProjectName }}_v{{ .Version }}'
|
binary: '{{ .ProjectName }}_v{{ .Version }}'
|
||||||
archives:
|
archives:
|
||||||
- formats: [ 'zip' ]
|
- formats: [ 'zip' ]
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,9 @@
|
||||||
# value = stackit_kms_key.key.key_id
|
# value = stackit_kms_key.key.key_id
|
||||||
# }
|
# }
|
||||||
|
|
||||||
resource "stackitprivatepreview_sqlserverflexalpha_instance" "sqlsrv" {
|
resource "stackitprivatepreview_sqlserverflexalpha_instance" "msh-sna-001" {
|
||||||
project_id = var.project_id
|
project_id = var.project_id
|
||||||
name = "msh-example-instance-002"
|
name = "msh-sna-001"
|
||||||
backup_schedule = "0 3 * * *"
|
backup_schedule = "0 3 * * *"
|
||||||
retention_days = 31
|
retention_days = 31
|
||||||
flavor_id = data.stackitprivatepreview_sqlserverflexalpha_flavor.sqlserver_flavor.flavor_id
|
flavor_id = data.stackitprivatepreview_sqlserverflexalpha_flavor.sqlserver_flavor.flavor_id
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue