-
Notifications
You must be signed in to change notification settings - Fork 15
38 lines (35 loc) · 1.06 KB
/
check-pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Check PR
on:
workflow_dispatch:
pull_request:
branches: [ master ]
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- run: git tag $(cat VERSION)
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.19
- name: Setup `packer`
uses: hashicorp/setup-packer@main
id: setup
with:
version: 1.11.0-beta
- name: Describe plugin
id: plugin_describe
run: echo "::set-output name=api_version::$(go run . describe | jq -r '.api_version')"
- name: Install packer-pdc
run: go get github.com/hashicorp/packer-plugin-sdk/cmd/packer-sdc@latest
- name: Run GoReleaser build
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: build --single-target --snapshot --clean
env:
PACKER_CI_PROJECT_API_VERSION: ${{ steps.plugin_describe.outputs.api_version }}