Skip to content
This repository has been archived by the owner on Apr 21, 2024. It is now read-only.

Commit

Permalink
try build & push
Browse files Browse the repository at this point in the history
  • Loading branch information
bohrasd committed Feb 20, 2024
1 parent 8384f10 commit 8c9c542
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Docker Image
on:
push:
branches:
- "master"
- "try-ci"
tags:
- "v*.*.*"
pull_request:
branches:
- "master"

jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Env
id: vars
shell: bash
run: |
echo "SHA_SHORT=$(git rev-parse --short HEAD)" >> "${GITHUB_ENV}"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
install: true
driver: docker
platforms: linux/arm64

- name: Login to GitHub Packages
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/arm64
file: ./.docker/Dockerfile-build
push: true
tags: ghcr.io/theplant/kratos:${{ env.SHA_SHORT }}
build-args: |
COMMIT=${{ env.SHA_SHORT }}
BUILD_DATE=$(shell date -u +"%Y-%m-%dT%H:%M:%SZ")

0 comments on commit 8c9c542

Please sign in to comment.