Try actions
Some checks failed
Build and Push Docker Image / build (push) Failing after 1s
Build and Push Docker Image / cleanup (push) Has been skipped

This commit is contained in:
Florian Hoss 2024-10-31 08:14:53 +01:00
parent cfed6fc2ed
commit 3259614717
Signed by: flohoss
GPG key ID: 3F35C7F6E6F66F6B

View file

@ -0,0 +1,28 @@
name: Build and Push Docker Image
on:
push:
branches:
- main
env:
LATEST_IMAGE: ${{ github.GITHUB_SERVER_URL }}/${{ github.GITHUB_REPOSITORY }}:latest
jobs:
build:
runs-on: self-hosted
steps:
- run: |
docker build \
--build-arg V_GOLANG=${{ vars.V_GOLANG }} \
--build-arg V_NODE=${{ vars.V_NODE }} \
--build-arg V_ALPINE=${{ vars.V_ALPINE }} \
--tag ${{ env.LATEST_IMAGE }} \
--push .
cleanup:
runs-on: self-hosted
needs: build
steps:
- run: |
docker system prune -a -f