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 <nierro92@gmail.com>
  • Loading branch information
FedeDP committed Aug 1, 2023
1 parent 8d18f04 commit dc5c555
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: [X64, ARM64]
runs-on: [ "self-hosted", "linux", "${{matrix.architecture}}" ]

steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Login to Github Packages
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build images
working-directory: ./images
run: |
make build-all
- 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 dc5c555

Please sign in to comment.