Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
razmser committed Jun 13, 2024
1 parent 5623733 commit 4e42e5b
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 130 deletions.
74 changes: 32 additions & 42 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,54 +76,44 @@ jobs:
name: statshouse-pkg-rpm-${{needs.env.outputs.version}}${{strategy.job-index}}
path: RPMS/*.rpm
debian:
if: ${{false}}
strategy:
matrix:
release: [buster, bullseye]
release: [bullseye, bookworm]
needs: [env, frontend]
uses: ./.github/workflows/build_deb.yml
with:
container_json: '{"image":"golang:1.22-${{matrix.release}}"}'
ref: ${{needs.env.outputs.ref}}
ref_timestamp: ${{needs.env.outputs.ref_timestamp}}
timestamp: ${{needs.env.outputs.timestamp}}
version: ${{needs.env.outputs.version}}
name: 'debian'
release: ${{matrix.release}}
frontend-artifact: ${{needs.frontend.outputs.artifact}}
secrets: inherit
ubuntu_jammy:
if: ${{false}}
needs: [env, frontend]
uses: ./.github/workflows/build_deb.yml
with:
runs-on: ubuntu-22.04
setup-go: true
ref: ${{needs.env.outputs.ref}}
ref_timestamp: ${{needs.env.outputs.ref_timestamp}}
timestamp: ${{needs.env.outputs.timestamp}}
version: ${{needs.env.outputs.version}}
name: ubuntu
release: jammy
frontend-artifact: ${{needs.frontend.outputs.artifact}}
secrets: inherit
ubuntu_focal:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: VKCOM/statshouse
ref: ${{needs.env.outputs.ref}}
fetch-depth: 0
- run: echo "BUILD_VERSION=`echo ${{needs.env.outputs.version}} | sed -e 's:-:.:g'`" >> $GITHUB_ENV
- run: build/make-pkg.sh debian-${{matrix.release}}
- uses: actions/upload-artifact@v4
with:
name: statshouse-pkg-debian-${{inputs.version}}${{github.run_number}}${{strategy.job-index}}
path: target/debian-${{matrix.release}}/*.deb
ubuntu:
strategy:
matrix:
release: [focal, jammy]
needs: [env, frontend]
uses: ./.github/workflows/build_deb.yml
with:
runs-on: ubuntu-20.04
setup-go: true
ref: ${{needs.env.outputs.ref}}
ref_timestamp: ${{needs.env.outputs.ref_timestamp}}
timestamp: ${{needs.env.outputs.timestamp}}
version: ${{needs.env.outputs.version}}
name: ubuntu
release: focal
frontend-artifact: ${{needs.frontend.outputs.artifact}}
secrets: inherit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: VKCOM/statshouse
ref: ${{needs.env.outputs.ref}}
fetch-depth: 0
- run: echo "BUILD_VERSION=`echo ${{needs.env.outputs.version}} | sed -e 's:-:.:g'`" >> $GITHUB_ENV
- run: build/make-pkg.sh ubuntu-${{matrix.release}}
- uses: actions/upload-artifact@v4
with:
name: statshouse-pkg-ubuntu-${{inputs.version}}${{github.run_number}}${{strategy.job-index}}
path: target/ubuntu-${{matrix.release}}/*.deb
draft_release:
if: ${{ github.event.inputs.draft_release }}
needs: [env, rpm, ubuntu_focal]
needs: [env, rpm, ubuntu, debian]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
87 changes: 0 additions & 87 deletions .github/workflows/build_deb.yml

This file was deleted.

4 changes: 3 additions & 1 deletion build/make-pkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ BUILD_COMMIT_TS="$(git log --format="%ct" -n 1)"
GOCACHE=$PWD/build/go-cache
mkdir -p "$GOCACHE"

if [[ $TAG == ubuntu* ]]; then
if [[ $TAG == "ubuntu-focal" ]]; then
docker build --file build/golang-ubuntu/golang-1.21-focal.Dockerfile --tag golang:1.21-focal build/golang-ubuntu
fi
if [[ $TAG == "ubuntu-jammy" ]]; then
docker build --file build/golang-ubuntu/golang-1.21-jammy.Dockerfile --tag golang:1.21-jammy build/golang-ubuntu
fi

Expand Down

0 comments on commit 4e42e5b

Please sign in to comment.