Skip to content

Commit

Permalink
new(ci): push docker images to ghcr.
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Di Pierro <[email protected]>
  • Loading branch information
FedeDP committed Dec 6, 2023
1 parent 1aa4263 commit 3833586
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
46 changes: 46 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build and Push docker images
on:
pull_request:
branches:
- main
paths:
- 'images/**'
push:
branches:
- main
paths:
- 'images/**'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
push-images:
strategy:
fail-fast: false
matrix:
architecture: [amd64, arm64]
runs-on: ${{ (matrix.arch == 'arm64' && 'actuated-arm64-8cpu-16gb') || 'ubuntu-22.04' }}
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Build images
working-directory: ./images
run: |
make build-all
- name: Login to Github Packages
if: ${{ github.event_name == 'push' }}
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push images
if: ${{ github.event_name == 'push' }}
working-directory: ./images
run: |
make docker-push
2 changes: 1 addition & 1 deletion images/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
DRY_RUN := false
REPOSITORY := falcosecurity/kernel-testing
REPOSITORY := ghcr.io/falcosecurity/kernel-testing
ARCH ?= $(shell uname -m)
YAML_FILE := images.yaml

Expand Down

0 comments on commit 3833586

Please sign in to comment.