mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-26 15:08:28 +00:00
Try to populate -ldflags
in Docker builds
This commit is contained in:
parent
ede4632835
commit
98b73652e0
2 changed files with 4 additions and 3 deletions
6
.github/workflows/docker.yml
vendored
6
.github/workflows/docker.yml
vendored
|
@ -35,6 +35,7 @@ jobs:
|
||||||
BRANCH=$(git symbolic-ref --short HEAD | tr -d \/)
|
BRANCH=$(git symbolic-ref --short HEAD | tr -d \/)
|
||||||
[ ${BRANCH} == "main" ] && BRANCH=""
|
[ ${BRANCH} == "main" ] && BRANCH=""
|
||||||
echo "BRANCH=${BRANCH}" >> $GITHUB_ENV
|
echo "BRANCH=${BRANCH}" >> $GITHUB_ENV
|
||||||
|
echo "FLAGS=\"-X github.com/matrix-org/dendrite/internal.branch=${{ env.BRANCH }} -X github.com/matrix-org/dendrite/internal.build=${{ env.BUILD }}\"" >> $GITHUB_ENV
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v1
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
|
@ -59,7 +60,6 @@ jobs:
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
context: .
|
context: .
|
||||||
build-args: FLAGS="-X github.com/matrix-org/dendrite/internal.branch=${{ env.BRANCH }} -X github.com/matrix-org/dendrite/internal.build=${{ env.BUILD }}"
|
|
||||||
target: monolith
|
target: monolith
|
||||||
platforms: ${{ env.PLATFORMS }}
|
platforms: ${{ env.PLATFORMS }}
|
||||||
push: true
|
push: true
|
||||||
|
@ -114,6 +114,7 @@ jobs:
|
||||||
BRANCH=$(git symbolic-ref --short HEAD | tr -d \/)
|
BRANCH=$(git symbolic-ref --short HEAD | tr -d \/)
|
||||||
[ ${BRANCH} == "main" ] && BRANCH=""
|
[ ${BRANCH} == "main" ] && BRANCH=""
|
||||||
echo "BRANCH=${BRANCH}" >> $GITHUB_ENV
|
echo "BRANCH=${BRANCH}" >> $GITHUB_ENV
|
||||||
|
echo "FLAGS=\"-X github.com/matrix-org/dendrite/internal.branch=${{ env.BRANCH }} -X github.com/matrix-org/dendrite/internal.build=${{ env.BUILD }}\"" >> $GITHUB_ENV
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v1
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
|
@ -138,7 +139,6 @@ jobs:
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
context: .
|
context: .
|
||||||
build-args: FLAGS="-X github.com/matrix-org/dendrite/internal.branch=${{ env.BRANCH }} -X github.com/matrix-org/dendrite/internal.build=${{ env.BUILD }}"
|
|
||||||
target: polylith
|
target: polylith
|
||||||
platforms: ${{ env.PLATFORMS }}
|
platforms: ${{ env.PLATFORMS }}
|
||||||
push: true
|
push: true
|
||||||
|
@ -192,6 +192,7 @@ jobs:
|
||||||
BRANCH=$(git symbolic-ref --short HEAD | tr -d \/)
|
BRANCH=$(git symbolic-ref --short HEAD | tr -d \/)
|
||||||
[ ${BRANCH} == "main" ] && BRANCH=""
|
[ ${BRANCH} == "main" ] && BRANCH=""
|
||||||
echo "BRANCH=${BRANCH}" >> $GITHUB_ENV
|
echo "BRANCH=${BRANCH}" >> $GITHUB_ENV
|
||||||
|
echo "FLAGS=\"-X github.com/matrix-org/dendrite/internal.branch=${{ env.BRANCH }} -X github.com/matrix-org/dendrite/internal.build=${{ env.BUILD }}\"" >> $GITHUB_ENV
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v1
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
|
@ -231,7 +232,6 @@ jobs:
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
context: .
|
context: .
|
||||||
build-args: FLAGS="-X github.com/matrix-org/dendrite/internal.branch=${{ env.BRANCH }} -X github.com/matrix-org/dendrite/internal.build=${{ env.BUILD }}"
|
|
||||||
target: demo-pinecone
|
target: demo-pinecone
|
||||||
platforms: ${{ env.PLATFORMS }}
|
platforms: ${{ env.PLATFORMS }}
|
||||||
push: true
|
push: true
|
||||||
|
|
|
@ -12,6 +12,7 @@ GOOS="linux"
|
||||||
|
|
||||||
echo "Target arch: $TARGETARCH"
|
echo "Target arch: $TARGETARCH"
|
||||||
echo "User arch: $USERARCH"
|
echo "User arch: $USERARCH"
|
||||||
|
echo "Link flags: $FLAGS"
|
||||||
|
|
||||||
if [ "$TARGETARCH" != "$USERARCH" ]; then
|
if [ "$TARGETARCH" != "$USERARCH" ]; then
|
||||||
if [ "$USERARCH" != "amd64" ]; then
|
if [ "$USERARCH" != "amd64" ]; then
|
||||||
|
|
Loading…
Reference in a new issue