Skip to content

Commit

Permalink
gha: publish docker image only on pushes to branch server
Browse files Browse the repository at this point in the history
  • Loading branch information
tiero committed Oct 25, 2023
1 parent 89ada28 commit 6483e52
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/on-push-server.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: On Push Server

on:
push:
branches:
- server

jobs:
push-docker-image:
runs-on: ubuntu-latest
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"

steps:
- uses: actions/checkout@v3

- name: tag
id: next_tag
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
with:
install: true

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build & push prem
run: >-
docker buildx build --push
--file Dockerfile
--tag ghcr.io/premai-io/prem-app:latest
--platform linux/arm64,linux/amd64 .

0 comments on commit 6483e52

Please sign in to comment.