-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add github action file to include Earthly
- Loading branch information
Showing
2 changed files
with
84 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: Build and Release | ||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
buildAndPush: | ||
runs-on: ubuntu-latest | ||
env: | ||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | ||
FORCE_COLOR: 1 | ||
steps: | ||
- uses: earthly/actions-setup@v1 | ||
with: | ||
version: v0.8.0 | ||
- name: Set up QEMU | ||
id: qemu | ||
uses: docker/setup-qemu-action@v1 | ||
with: | ||
image: tonistiigi/binfmt:latest | ||
platforms: all | ||
- uses: actions/checkout@v4 | ||
- name: Docker Login | ||
run: docker login --username "$DOCKERHUB_USERNAME" --password "$DOCKERHUB_TOKEN" | ||
- name: Run build | ||
run: earthly --ci --push +build-all-platforms | ||
|
||
|
||
# - uses: actions/checkout@v2 | ||
# - name: Set up JDK 21 | ||
# uses: actions/setup-java@v2 | ||
# with: | ||
# java-version: 21 | ||
# distribution: 'liberica' | ||
# - name: Decode GPG Key | ||
# run: | | ||
# mkdir -p ~/.gradle/ | ||
# echo "${{secrets.SIGNING_KEY}}" > ~/.gradle/secring.gpg.b64 | ||
# base64 -d ~/.gradle/secring.gpg.b64 > ~/.gradle/secring.gpg | ||
# - name: Grant execute permission for gradlew | ||
# run: chmod +x gradlew | ||
# - name: Build with Gradle | ||
# run: ./gradlew clean build -Psigning.keyId=${{ secrets.SIGNING_KEY_ID }} -Psigning.password=${{ secrets.SIGNING_PASSWORD }} -Psigning.secretKeyRingFile=$(echo ~/.gradle/secring.gpg) --warn --stacktrace | ||
# - name: 'Get Version Number' | ||
# run: | | ||
# ARTIFACT_VERSION=$(./gradlew properties -q | grep "version:" | awk '{print $2}') | ||
# echo "VERSION=${ARTIFACT_VERSION}" >> $GITHUB_ENV | ||
# - name: Release | ||
# uses: softprops/action-gh-release@v1 | ||
# if: startsWith(github.ref, 'refs/tags/') | ||
# with: | ||
# files: | | ||
# build/libs/yaci*-${{env.VERSION}}.jar | ||
# prerelease: true | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# - name: Set up QEMU | ||
# uses: docker/setup-qemu-action@v2 | ||
# - name: Set up Docker Buildx | ||
# uses: docker/setup-buildx-action@v2 | ||
# - name: Login to Docker Hub | ||
# uses: docker/login-action@v2 | ||
# with: | ||
# username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
# password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
# - name: Build and push | ||
# uses: docker/build-push-action@v4 | ||
# with: | ||
# context: . | ||
# platforms: linux/amd64,linux/arm64 | ||
# push: true | ||
# build-args: APP_VERSION=${{env.VERSION}} | ||
# tags: bloxbean/yaci-cli:latest,bloxbean/yaci-cli:${{ env.VERSION }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters