Skip to content

Commit

Permalink
build workflow package
Browse files Browse the repository at this point in the history
  • Loading branch information
solita-michalguspiel committed Jul 25, 2024
1 parent bb920b1 commit cccc5c6
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/http-container.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Create docker container on push to main

on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64

- uses: docker/setup-buildx-action@v2

- name: Setup SSH agent
run: |
eval `ssh-agent`
echo "SSH_AUTH_SOCK=$SSH_AUTH_SOCK" >> "$GITHUB_ENV"
- name: Login to Github Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v3
with:
images: ghcr.io/tiiuae/manpack-tts-handler
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=sha
type=raw,value=latest
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
file: Dockerfile.http
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
ssh: default=${{ env.SSH_AUTH_SOCK }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit cccc5c6

Please sign in to comment.