From 5a92ce141366b02c337abc8c767cfaa45d78f9ce Mon Sep 17 00:00:00 2001 From: Vladimir Smirnov Date: Fri, 9 Dec 2022 08:28:13 +0100 Subject: [PATCH] Fix docker upload image workflow --- .github/workflows/docker-ghcrio.yml | 9 +--- .github/workflows/packages-rockylinux-9.yaml | 52 ++++++++++++++++++++ CHANGES.md | 5 ++ 3 files changed, 59 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/packages-rockylinux-9.yaml diff --git a/.github/workflows/docker-ghcrio.yml b/.github/workflows/docker-ghcrio.yml index a4af53619..59aa2f104 100644 --- a/.github/workflows/docker-ghcrio.yml +++ b/.github/workflows/docker-ghcrio.yml @@ -1,14 +1,10 @@ name: Upload Docker images to ghcr.io on: - workflow_run: - workflows: ["Tests"] - tags: [ 'v*' ] - types: - - completed + release: + types: [created] jobs: docker: name: Build image - if: ${{ github.event.workflow_run.conclusion == 'success' }} runs-on: ubuntu-latest steps: - name: Check out code @@ -28,7 +24,6 @@ jobs: type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}}.{{minor}}.{{patch}} - name: Login to ghcr.io - if: github.event_name != 'pull_request' uses: docker/login-action@v2 with: registry: ghcr.io diff --git a/.github/workflows/packages-rockylinux-9.yaml b/.github/workflows/packages-rockylinux-9.yaml new file mode 100644 index 000000000..3d67013d1 --- /dev/null +++ b/.github/workflows/packages-rockylinux-9.yaml @@ -0,0 +1,52 @@ +name: Build packages for Rockylinux 9 + +on: + workflow_run: + workflows: ["Tests"] + branches: [ main ] + types: + - completed + push: + tags: + - v.* +jobs: + build-packages-rockylinux-9: + name: Build packages for Rockylinux 9 + if: ${{ github.event.workflow_run.conclusion == 'success' }} + runs-on: ubuntu-latest + strategy: + matrix: + go: + - ^1 + steps: + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: ${{ matrix.go }} + - name: Set up Ruby for package_cloud uploader to work + uses: ruby/setup-ruby@v1 + with: + ruby-version: '2.7' # Version range or exact version of a Ruby version to use, using semvers version range syntax. + - name: Install packaging dependencies + run: | + sudo apt-get install libcairo2-dev mercurial pkg-config wget -y + gem install package_cloud + - name: Check out code into the Go module directory + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Log in to GitHub Docker Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Create packages + env: + BUILD_PACKAGES: true + PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }} + run: | + wget "https://raw.githubusercontent.com/go-graphite/helper-scripts/main/build.sh" && chmod +x ./build.sh + ./build.sh carbonapi "rockylinux:9" diff --git a/CHANGES.md b/CHANGES.md index 933bb9088..2f7e3027b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -17,6 +17,11 @@ Changes CHANGELOG --------- +**0.16.0.1** + - [Build] Fix automation that builds docker images + - [Build] Add rockylinux-9 packages (RHEL 9) + - [Build] Update build version of golang to 1.19.4 + **0.16.0** - [Improvement] Deprecate and remove carbonzipper binary (thx to @msaf1980) - [Improvement] Remove deprecated carbonsearch support