Skip to content

feat: add packaging for rpm and deb and push to fury.io (#1678) #9160

feat: add packaging for rpm and deb and push to fury.io (#1678)

feat: add packaging for rpm and deb and push to fury.io (#1678) #9160

Workflow file for this run

# Copyright 2023 Terramate GmbH
# SPDX-License-Identifier: MPL-2.0
name: ci
on:
push:
branches:
- main
- v0.4.x
pull_request:
jobs:
checks:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Configure asdf and plugins needed
uses: asdf-vm/actions/install@83133f03f5693901c2296a8e622955087dc20267
- name: checking go mod tidyness
run: terramate run --tags golang --changed -- make mod/check
- name: linting code
run: terramate run --tags golang --changed -- make lint
- name: checking license on source code
run: terramate run --tags golang --changed -- make license/check
build_test:
name: Build and Test
runs-on: ${{ matrix.os }}
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
strategy:
matrix:
os: ["ubuntu-20.04", "macos-13"]
go: ["1.21"]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- uses: opentofu/setup-opentofu@v1
with:
tofu_version: 1.6.2
tofu_wrapper: false
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Configure asdf and plugins needed
uses: asdf-vm/actions/install@83133f03f5693901c2296a8e622955087dc20267
- name: make generate
run: terramate generate
- name: make test
run: terramate run --tags golang --changed -- make test
env:
TM_TEST_TERRAFORM_REQUIRED_VERSION: "1.7.5"
- name: make build
run: terramate run --tags golang --changed -- make build
- name: check cloud info
run: terramate run --tags golang --changed -- ./bin/terramate -vv experimental cloud info
gh_integration_test:
name: GHA Integration Test
runs-on: "ubuntu-20.04"
steps:
- uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Configure asdf and plugins needed
uses: asdf-vm/actions/install@83133f03f5693901c2296a8e622955087dc20267
- name: make test/ci
run: terramate run --tags golang --changed -- make test/ci
release_dry_run:
name: Release Dry Run
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Configure asdf and plugins needed
uses: asdf-vm/actions/install@83133f03f5693901c2296a8e622955087dc20267
- name: install cosign
run: go install github.com/sigstore/cosign/v2/cmd/cosign@latest
- name: install goreleaser
run: |
curl -sL https://github.com/goreleaser/goreleaser-pro/releases/download/v1.14.0-pro/goreleaser-pro_Linux_x86_64.tar.gz -o goreleaser.tar.gz
tar -xzf goreleaser.tar.gz
chmod +x goreleaser
sudo mv goreleaser /usr/local/bin/
- name: release dry run
run: terramate run --tags golang --changed -- make release/dry-run
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_KEY: ${{ secrets.GORELEASER_API_KEY }}
FURY_TOKEN: ${{ secrets.FURY_TOKEN}}
ci:
needs:
- checks
- build_test
- gh_integration_test
runs-on: ubuntu-20.04
steps:
- uses: Kesin11/actions-timeline@v1