mirror of
https://github.com/remvze/moodist.git
synced 2025-12-17 08:54:13 +00:00
40 lines
935 B
YAML
40 lines
935 B
YAML
name: Build and push main image
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- '*'
|
|
|
|
jobs:
|
|
push-store-image:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: 'Checkout GitHub Action'
|
|
uses: actions/checkout@main
|
|
|
|
- name: 'Login to GitHub Container Registry'
|
|
uses: docker/login-action@v1
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{github.actor}}
|
|
password: ${{secrets.ACCESS_TOKEN}}
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v1
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
- name: 'Build and push Inventory Image'
|
|
run: |
|
|
IMAGE_NAME="ghcr.io/remvze/moodist"
|
|
|
|
GIT_TAG=${{ github.ref }}
|
|
GIT_TAG=${GIT_TAG#refs/tags/}
|
|
|
|
docker buildx build \
|
|
--platform linux/amd64,linux/arm64 \
|
|
-t $IMAGE_NAME:latest \
|
|
-t $IMAGE_NAME:$GIT_TAG \
|
|
--push .
|