REFINE docker steps
This commit is contained in:
parent
3bae954473
commit
e7a20f2ca7
14
.github/workflows/image_creation.yaml
vendored
14
.github/workflows/image_creation.yaml
vendored
@ -19,11 +19,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Set Up BuildX
|
- name: Set Up BuildX
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
with:
|
|
||||||
config-inline: |
|
|
||||||
[registry."${{ vars.GITEAINSTANCE }}"]
|
|
||||||
http = true
|
|
||||||
insecure = true
|
|
||||||
|
|
||||||
- name: Login to Docker
|
- name: Login to Docker
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
@ -31,7 +26,11 @@ jobs:
|
|||||||
registry: https://git.maximotejeda.com
|
registry: https://git.maximotejeda.com
|
||||||
username: ${{ vars.USERNAME }}
|
username: ${{ vars.USERNAME }}
|
||||||
password: ${{ secrets.PWD }}
|
password: ${{ secrets.PWD }}
|
||||||
|
|
||||||
|
- name: calculate short sha
|
||||||
|
run: |
|
||||||
|
echo "shortsha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
@ -39,3 +38,6 @@ jobs:
|
|||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: git.maximotejeda.com/maximo/ddns:${{ github.ref_name }}
|
tags: git.maximotejeda.com/maximo/ddns:${{ github.ref_name }}
|
||||||
|
build-args:
|
||||||
|
- version=${{ github.ref_name}}
|
||||||
|
- SHORTSHA=${{ steps.vars.outputs.shortsha }}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
FROM golang:alpine AS builder
|
FROM golang:alpine AS builder
|
||||||
ARG TARGETPLATFORM=no-set
|
ARG BUILDPLATFORM=${BUILDPLATFORM:-linux/amd64}
|
||||||
ARG version=not-set
|
ARG version=not-set
|
||||||
ARG SHORTSHA=not-set
|
ARG SHORTSHA=not-set
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user