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

feat: add a workflow to push server image #12

Merged
merged 1 commit into from
Nov 18, 2022
Merged
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
38 changes: 38 additions & 0 deletions .github/workflows/push-server-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: "Build and Push Server Image"
on:
workflow_dispatch:
inputs:
image_tag:
description: 'The server image tag'
required: true
concurrency:
group: ci-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
jobs:
push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver: docker
- name: Build and Push Image
uses: docker/build-push-action@v3
env:
IMAGE_TAG: ${{ github.event.inputs.image_tag }}
with:
context: .
file: manifests/Dockerfile-server
push: true
tags: ghcr.io/knight42/krelay-server:${{ env.IMAGE_TAG }}
platforms: linux/amd64,linux/arm/v7,linux/arm64
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Unignore all dirs
!*/
!Dockerfile
!Dockerfile-server
!Makefile

### Above combination will ignore all files without extension ###
Expand Down
File renamed without changes.