-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (53 loc) · 1.7 KB
/
Copy pathgo.yml
File metadata and controls
59 lines (53 loc) · 1.7 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Go
on:
push:
branches: [ "main" ]
tags: ["V*.*.*"]
pull_request:
branches: [ "main" ]
permissions:
contents: read
packages: write
attestations: write
id-token: write
jobs:
build:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
- name: Buildah Action
uses: redhat-actions/buildah-build@7a95fa7ee0f02d552a32753e7414641a04307056
with:
image: phantom
tags: ${{ github.event_type == 'push' && github.ref_name || github.sha }}
containerfiles: |
./Containerfile
- name: Run go vet
run: podman run phantom:${{ github.sha }} go vet -v ./...
- name: Run go test
run: podman run phantom:${{ github.sha }} go test -v ./...
- name: Buildah Action
# Push events mean either a tag or main branch
if: github.event_name == 'push'
uses: redhat-actions/buildah-build@7a95fa7ee0f02d552a32753e7414641a04307056
with:
image: phantom
tags: ${{ github.ref_name }}
containerfiles: |
./Containerfile
# Push the image to GHCR (Image Registry)
- name: Push To GHCR
# Push events mean either a tag or main branch
if: github.event_name == 'push'
uses: redhat-actions/push-to-registry@5ed88d269cf581ea9ef6dd6806d01562096bee9c # v2.8
id: push
with:
image: phantom
tags: ${{ github.ref_name }}
registry: ghcr.io/bugbundle
username: ${{ github.actor }}
password: ${{ github.token }}
extra-args: |
--disable-content-trust