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 services and push #4225

Open
wants to merge 4 commits 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
56 changes: 56 additions & 0 deletions .github/workflows/release_services.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
name: release_services

on:
push:
branches:
- main

permissions:
contents: read
packages: write

jobs:
build-image:
strategy:
matrix:
apps:
- name: job_sidecar_container
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v4
- name: Get changed files in the docs folder
id: changed-files-specific
uses: tj-actions/[email protected]
with:
files: services/${{ matrix.apps.name }}/**
- name: Set up QEMU
if: steps.changed-files-specific.outputs.any_changed == 'true'
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
if: steps.changed-files-specific.outputs.any_changed == 'true'
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Package Registry
if: steps.changed-files-specific.outputs.any_changed == 'true'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set Github tag
if: steps.changed-files-specific.outputs.any_changed == 'true'
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Build and push
if: steps.changed-files-specific.outputs.any_changed == 'true'
uses: docker/build-push-action@v5
env:
DOCKER_BUILDKIT: 1
with:
context: services/${{ matrix.apps.name }}
platforms: linux/amd64,linux/arm64
push: github.ref == 'refs/heads/master'
tags: |
ghcr.io/porter-dev/${{ matrix.apps.name }}:${{ steps.vars.outputs.sha_short }}
ghcr.io/porter-dev/${{ matrix.apps.name }}:latest
1 change: 1 addition & 0 deletions services/job_sidecar_container/job_killer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# Usage: job_killer.sh [-c]? [grace_period_seconds] [process_pattern] [sidecar]?
#
#
# This script waits for a termination signal and gracefully terminates another process before exiting.
#
# Attempts to gracefully kill a process by sending SIGTERM to the first process that matches
Expand Down
Loading