mirror of https://github.com/fmartingr/bazaar.git
test workflow
This commit is contained in:
parent
e38ef174fa
commit
8f6c28bbd9
|
@ -15,9 +15,10 @@ jobs:
|
|||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: dist
|
||||
path: dist
|
||||
|
||||
- name: Buildx
|
||||
run: |
|
||||
|
@ -31,4 +32,3 @@ jobs:
|
|||
fi
|
||||
|
||||
CONTAINER_BUILDX_OPTIONS="--push --output=type=registry --tag $REPOSITORY:$(git describe --tags) --tag $REPOSITORY:$TAG" make buildx
|
||||
docker buildx build -f Dockerfile.ci --platform=linux/amd64,arm64,linux/arm/v7 --push --output=type=registry --tag $REPO:$TAG --tag $REPO:$TAG2 .
|
||||
|
|
|
@ -6,7 +6,7 @@ on:
|
|||
- latest
|
||||
|
||||
concurrency:
|
||||
group: ci-tests-${{ github.ref }}-1
|
||||
group: ci-pull-request-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
|
|
@ -8,9 +8,13 @@ on:
|
|||
permissions:
|
||||
contents: write # Required to upload dist files
|
||||
|
||||
concurrency:
|
||||
group: ci-push-version-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
goreleaser:
|
||||
uses: .github/workflows/_goreleaser.yml
|
||||
uses: ./.github/workflows/_goreleaser.yml
|
||||
docker-buildx:
|
||||
needs: goreleaser
|
||||
uses: .github/workflows/_docker-buildx.yml
|
||||
uses: ./.github/workflows/_docker-buildx.yml
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
name: "Test workflow"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- latest
|
||||
|
||||
permissions:
|
||||
contents: write # Required to upload dist files
|
||||
|
||||
concurrency:
|
||||
group: ci-tests-${{ github.ref }}-1
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
goreleaser:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.19
|
||||
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v2
|
||||
with:
|
||||
version: latest
|
||||
args: build --rm-dist --snapshot
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: dist
|
||||
path: ./dist/
|
||||
|
||||
docker-buildx:
|
||||
needs: goreleaser
|
||||
uses: ./.github/workflows/_docker-buildx.yml
|
2
Makefile
2
Makefile
|
@ -62,7 +62,7 @@ build: clean ### builds the project for the setup os/arch combinations
|
|||
@goreleaser build --rm-dist --snapshot
|
||||
|
||||
.PHONY: buildx
|
||||
buildx: build
|
||||
buildx:
|
||||
$(info: Make: Buildx)
|
||||
@bash scripts/buildx.sh
|
||||
|
||||
|
|
|
@ -12,13 +12,10 @@ if [ "$CONTAINER_RUNTIME" == "docker" ]; then
|
|||
$CONTAINER_RUNTIME buildx create --use --name bazaar_builder
|
||||
fi
|
||||
|
||||
cp -r $(pwd)/dist/bazaar_linux_arm_7 $(pwd)/dist/bazaar_linux_armv7
|
||||
cp -r $(pwd)/dist/bazaar_linux_amd64_v1 $(pwd)/dist/bazaar_linux_amd64
|
||||
cp -r dist/bazaar_linux_arm_7 dist/bazaar_linux_armv7
|
||||
cp -r dist/bazaar_linux_amd64_v1 dist/bazaar_linux_amd64
|
||||
|
||||
$CONTAINER_RUNTIME buildx build -f ${CONTAINERFILE_NAME} --platform=${BUILDX_PLATFORMS} --build-arg "ALPINE_VERSION=${CONTAINER_ALPINE_VERSION}" ${CONTAINER_BUILDX_OPTIONS} . | tee 2> /dev/null
|
||||
|
||||
# rm -rf $(pwd)/dist/bazaar_linux_armv7
|
||||
# rm -rf $(pwd)/dist/bazaar_linux_amd64
|
||||
$CONTAINER_RUNTIME buildx build -f ${CONTAINERFILE_NAME} --platform=${BUILDX_PLATFORMS} --build-arg "ALPINE_VERSION=${CONTAINER_ALPINE_VERSION}" ${CONTAINER_BUILDX_OPTIONS} .
|
||||
|
||||
if [ "$CONTAINER_RUNTIME" == "docker" ]; then
|
||||
$CONTAINER_RUNTIME buildx rm bazaar_builder
|
||||
|
|
Loading…
Reference in New Issue