Skip to content

Commit

Permalink
Temporarily use buildah instead of goreleaser to build image
Browse files Browse the repository at this point in the history
Signed-off-by: Kemal Akkoyun <[email protected]>
  • Loading branch information
kakkoyun committed Sep 22, 2021
1 parent c9278c8 commit 4400105
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 20 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Go
name: Container

on:
push:
Expand All @@ -8,13 +8,11 @@ on:

jobs:
build:
name: Container build
name: Container build and push
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Initialize and update libbpf submodule
run: git submodule init && git submodule update
- name: Get branch name
shell: bash
run: echo "GITHUB_BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV
Expand Down
32 changes: 25 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ jobs:
- name: Build UI
run: make ui

- name: Login to Github Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Disabled until fixing the authentication issue.
# - name: Login to Github Container Registry
# uses: docker/login-action@v1
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.PERSONAL_ACCESS_TOKEN }} # GITHUB_TOKEN

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
Expand All @@ -39,4 +40,21 @@ jobs:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}

container:
name: Container build and push
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Build container
env:
TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
run: make container
- name: Login to registry
run: |
echo "${{ secrets.PERSONAL_ACCESS_TOKEN }}" | buildah login -u parca-dev --password-stdin ghcr.io
- name: Push container
run: |
make push-container
20 changes: 11 additions & 9 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ changelog:
exclude:
- '^docs:'
- '^test:'
dockers:
- id: parca
goos: linux
goarch: amd64
dockerfile: Dockerfile.release
extra_files:
- parca.yaml
image_templates:
- ghcr.io/parca-dev/parca:{{ .Tag }}

# Disabled until fixing the authentication issue with ghcr.
#dockers:
# - id: parca
# goos: linux
# goarch: amd64
# dockerfile: Dockerfile.release
# extra_files:
# - parca.yaml
# image_templates:
# - ghcr.io/parca-dev/parca:{{ .Tag }}

0 comments on commit 4400105

Please sign in to comment.