Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build container image and push to quay.io #633

Merged
merged 1 commit into from
Aug 7, 2023
Merged
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
52 changes: 52 additions & 0 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build Image

on:
push:
branches:
- master
tags:
- "v*"
workflow_dispatch:
branches:
- master

env:
REGISTRY: quay.io
IMAGE_BASE: quay.io/keylime

jobs:
build-images:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.QUAY_USER }}
password: ${{ secrets.QUAY_TOKEN }}

- name: Generate docker metadata for keylime_agent
id: meta_agent
uses: docker/metadata-action@v3
with:
images: |
${{ env.IMAGE_BASE }}/keylime_agent
tags: |
type=ref,enable=true,priority=600,prefix=,suffix=,event=branch
type=ref,enable=true,priority=600,prefix=,suffix=,event=tag
type=sha,prefix=sha-

- name: Build and push agent image
id: build_agent
uses: docker/build-push-action@v2
env:
VERSION: "${{ steps.meta_base.outputs.version }}"
with:
context: .
file: docker/release/Dockerfile.fedora
push: true
tags: ${{ steps.meta_agent.outputs.tags }}
labels: ${{ steps.meta_agent.outputs.labels }}
Loading