Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup buildX engine for docker release #5982

Merged
merged 2 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .github/workflows/build-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ jobs:
PR_BUILD=false
if [[ "${SNAPSHOT_BUILD}" == "false" && "${RELEASE_BUILD}" == "false" ]]; then PR_BUILD=true; fi

BUILD_NUMBER="${{ github.run_id }}"-ghactions

if [[ "${RELEASE_BUILD}" == "true" ]]; then
BUILD_VERSION="${GITHUB_REF#/refs/tags/}";
elif [[ "${SNAPSHOT_BUILD}" == "true" ]]; then
Expand All @@ -60,8 +58,10 @@ jobs:
export RC_BUILD=$RC_BUILD;
export PR_BUILD=$PR_BUILD;
export SNAPSHOT_BUILD=$SNAPSHOT_BUILD;
export BUILD_NUMBER=$BUILD_NUMBER;
export BUILD_VERSION=$BUILD_VERSION;
export BUILD_NUMBER="${{ github.run_id }}"-ghactions;
export BUILD_COMMIT="$(echo ${GITHUB_SHA} | cut -c1-8)";
export BUILD_BRANCH="${GITHUB_REF_NAME}";
EOT

- uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -107,9 +107,8 @@ jobs:
with:
name: env.sh

- name: Setup Debber and FPM
- name: Setup FPM
run: |
go install github.com/debber/debber-v0.3/cmd/debber@latest
sudo apt-get install ruby-dev build-essential
sudo gem i fpm -f

Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_EC2_METADATA_DISABLED: true
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}

jobs:
release-snapshot:
Expand All @@ -36,6 +37,16 @@ jobs:
with:
name: env.sh
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Install Deb build scripts
run: sudo apt-get install devscripts build-essential lintian dput

- name: Release snapshot
run: |
Expand Down Expand Up @@ -70,6 +81,16 @@ jobs:
with:
name: env.sh
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Install Deb build scripts
run: sudo apt-get install devscripts build-essential lintian dput

- name: Release tag
run: |
Expand Down