Skip to content

Commit e747a17

Browse files
committed
push_image to quay
1 parent 850fa1e commit e747a17

File tree

3 files changed

+36
-6
lines changed

3 files changed

+36
-6
lines changed

.github/workflows/push_image.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: push image to Quay.io
2+
on:
3+
push:
4+
5+
env:
6+
REGISTRY_USER: netobserv+github_ci
7+
REGISTRY_PASSWORD: ${{ secrets.QUAY_SECRET }}
8+
9+
jobs:
10+
push-image:
11+
name: push image
12+
runs-on: ubuntu-20.04
13+
strategy:
14+
matrix:
15+
go: ['1.17']
16+
steps:
17+
- name: podman login to Quay.io
18+
uses: redhat-actions/podman-login@v1
19+
with:
20+
username: ${{ env.REGISTRY_USER }}
21+
password: ${{ env.REGISTRY_PASSWORD }}
22+
registry: quay.io
23+
- name: Install make
24+
run: sudo apt-get install make
25+
- name: Set up Go 1.x
26+
uses: actions/setup-go@v2
27+
with:
28+
go-version: ${{ matrix.go }}
29+
id: go
30+
- uses: actions/checkout@v2
31+
- name: push image
32+
run: make push-image

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ export CGO_ENABLED=1
1313

1414
SHELL := /bin/bash
1515
DOCKER_TAG ?= latest
16-
DOCKER_IMG ?= docker.io/cognetive/flowlogs2metrics
17-
OCI_RUNTIME ?= $(shell which docker || which podman)
16+
DOCKER_IMG ?= quay.io/netobserv/flowlogs2metrics
17+
OCI_RUNTIME ?= $(shell which podman || which docker)
1818
MIN_GO_VERSION := 1.17.0
1919
FL2M_BIN_FILE=flowlogs2metrics
2020
CG_BIN_FILE=confgenerator

contrib/docker/Dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@ COPY go.mod .
77
COPY go.sum .
88

99
# Download modules
10-
RUN --mount=type=cache,mode=0755,target=/root/.cache/go-build --mount=type=cache,mode=0755,target=/root/go \
11-
go mod download
10+
RUN go mod download
1211

1312
COPY cmd/ cmd/
1413
COPY pkg/ pkg/
1514

1615
# Build
17-
RUN --mount=type=cache,mode=0755,target=/root/.cache/go-build --mount=type=cache,mode=0755,target=/root/go \
18-
CGO_ENABLED=0 GOOS=linux GO111MODULE=on GOARCH=amd64 go build ./cmd/flowlogs2metrics
16+
RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on GOARCH=amd64 go build ./cmd/flowlogs2metrics
1917

2018
# final stage
2119
FROM ubuntu

0 commit comments

Comments
 (0)