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

Add PR Verify pipelines #21

Closed
wants to merge 2 commits into from
Closed
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
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
name: Anubis - Build and Test Submissions Service
name: Anubis - PR Verify

on:
push:
paths:
- "anubis-eval/**"
- ".github/workflows/anubis-eval-ci.yaml"

pull_request:
branches:
- develop
paths:
- "anubis-eval/**"
- ".github/workflows/anubis-eval-ci.yaml"
- ".github/workflows/anubis-eval-pr-verify.yaml"

jobs:
build:
name: Build and Test Anubis Eval Microservice
runs-on: ubuntu-latest
defaults:
run:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
name: Enki - Build and Test Problems Service
name: Enki - PR Verify

on:
push:
paths:
- "enki-problems/**"
- ".github/workflows/enki-problems-ci.yaml"

pull_request:
branches:
- develop
paths:
- "enki-problems/**"
- ".github/workflows/enki-problems-ci.yaml"
- ".github/workflows/enki-problems-pr-verify.yaml"

jobs:
build:
name: Build and Test Enki Problems Microservice
runs-on: ubuntu-latest
defaults:
run:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
name: Hermes - Build and Test Tests Service
name: Hermes - PR Verify

on:
push:
paths:
- "hermes-tests/**"
- ".github/workflows/hermes-tests-ci.yaml"

pull_request:
branches:
- develop
paths:
- "hermes-tests/**"
- ".github/workflows/hermes-tests-ci.yaml"
- ".github/workflows/hermes-tests-pr-verify.yaml"

env:
HERMES_CONFIG: ${{ secrets.HERMES_CONFIG }}

jobs:
build:
name: Build and Test Hermes Tests Microservice
runs-on: ubuntu-latest
defaults:
run:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
name: Quetzalcoatl - Build and Test Auth Service
name: Quetzalcoatl - PR Verify

on:
push:
paths:
- "quetzalcoatl-auth/**"
- ".github/workflows/quetzalcoatl-auth-ci.yaml"

pull_request:
branches:
- develop
paths:
- "quetzalcoatl-auth/**"
- ".github/workflows/quetzalcoatl-auth-ci.yaml"
- ".github/workflows/quetzalcoatl-auth-pr-verify.yaml"

jobs:
build:
name: Build and Test Quetzalcoatl Auth Microservice
runs-on: ubuntu-latest
defaults:
run:
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/step-deploy-to-docker-hub.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: "Step - Push Docker image to Docker Hub Registry"

on:
workflow_call:
inputs:
namespace:
type: string
required: true
repository:
type: string
required: true
build_context:
type: string
required: true

jobs:
deploy:
name: "Deploy to Docker Hub"
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ inputs.namespace }}/${{ inputs.repository }}

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: ${{ inputs.build_context }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
47 changes: 47 additions & 0 deletions .github/workflows/step-deploy-to-ghcr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: "Step - Push Docker image to GitHub Container Registry (GHCR)"

on:
workflow_call:
inputs:
image_name:
type: string
required: true
build_context:
type: string
required: true

jobs:
deploy:
name: "Deploy to GHCR"
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.image_name }}
tags: |
type=semver,pattern={{version}}

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: ${{ inputs.build_context }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Loading