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

This commit is contained in:
Florian Hoss 2024-10-31 09:13:16 +01:00
parent f420e5cc97
commit 82c488ed75
Signed by: flohoss
GPG key ID: 3F35C7F6E6F66F6B

View file

@ -13,18 +13,28 @@ jobs:
build:
runs-on: self-hosted
steps:
- run: echo $${{ github.token }} | docker login --username flohoss --password-stdin ${{ env.REGISTRY }}
- 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 .
- name: Checkout repository
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ env.LATEST_IMAGE }}
build-args: |
V_GOLANG=${{ vars.V_GOLANG }}
V_NODE=${{ vars.V_NODE }}
V_ALPINE=${{ vars.V_ALPINE }}
cleanup:
runs-on: self-hosted
needs: build
steps:
- run: |
docker system prune -a -f
- run: docker system prune -a -f