8000 Add GitHub Actions to build and publish images by snorwin · Pull Request #32 · cyberark/KubiScan · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add GitHub Actions to build and publish images #32

New issue
Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Master

on:
push:
branches: master

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to ghcr.io
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
file: ./Dockerfile
push: true
tags: ghcr.io/cyberark/kubiscan:latest
platforms: linux/amd64
- name: Build and push (Alpine)
uses: docker/build-push-action@v2
with:
file: ./DockerfileAlpine
push: true
tags: ghcr.io/cyberark/kubiscan:alpine
platforms: linux/amd64
35 changes: 35 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish (Release)

on:
release:
types:
- published

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to ghcr.io
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
file: ./Dockerfile
push: true
tags: ghcr.io/cyberark/kubiscan:${{ github.event.release.tag_name }}
platforms: linux/amd64
- name: Build and push (Alpine)
uses: docker/build-push-action@v2
with:
file: ./DockerfileAlpine
push: true
tags: ghcr.io/cyberark/kubiscan:${{ github.event.release.tag_name }}-alpine
platforms: linux/amd64 39E0
0