Skip to content

Commit

Permalink
Merge pull request #1 from redBorder/development
Browse files Browse the repository at this point in the history
Release 0.0.1
  • Loading branch information
malvads authored Apr 25, 2024
2 parents 7427702 + c8b81b3 commit d94fc1b
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 10 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/rpm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: RPM Build and Upload

on:
push:
branches:
- 'master'
- 'main'

jobs:
build:
runs-on: ubuntu-latest

env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true

steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Create tag based on metadata.rb
id: create_tag
run: |
TAG=$(grep -o 'version\s*["'\''][^"'\'']*' ./resources/metadata.rb | sed 's/version\s*["'\'']//;s/["'\'']//')
echo "TAG=$TAG" >> $GITHUB_ENV
shell: bash

- name: Set Version
run: echo "VERSION=${{ env.TAG }}" >> $GITHUB_ENV

- name: Run Docker Container
run: docker run --privileged -d --name builder --network host rockylinux:9 /bin/sleep infinity

- name: Install build tools RPM
run: |
docker cp ./ builder:/build
docker exec builder bash -c "yum install -y epel-release && yum install -y make git mock"
docker exec builder bash -c "rm -rf /etc/mock/default.cfg"
- name: Setup SDK
run: |
docker exec builder bash -c "curl https://raw.githubusercontent.com/redBorder/repoinit/master/sdk9.cfg > /build/sdk9.cfg"
docker exec builder bash -c "echo \"config_opts['use_host_resolv'] = True\" >> /build/sdk9.cfg"
docker exec builder bash -c "ln -s /build/sdk9.cfg /etc/mock/default.cfg"
- name: Build RPM using mock
run: |
docker exec builder bash -c "git config --global --add safe.directory /build"
docker exec builder bash -c "cd /build/ && VERSION=${{ env.TAG }} make rpm"
- name: Copy RPMS
run: |
docker cp builder:/build/packaging/rpm/pkgs/. ./rpms
- name: Delete non-.rpm files
run: |
find ./rpms -type f -not -name '*.rpm' -exec rm {} \;
- name: Release
uses: softprops/action-gh-release@v1
with:
files: ./rpms/*
tag_name: ${{ env.TAG }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13 changes: 3 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
cookbook-selix CHANGELOG
cookbook-rb-exporter CHANGELOG
==========================

This file is used to list changes made in each version of the ntp cookbook.

0.0.1
-----
- [jjptapia]
- COMMIT_REF Initial release of cookbook ntp

- - -
Check the [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) for help with Markdown.

The [Github Flavored Markdown page](http://github.github.com/github-flavored-markdown/) describes the differences between markdown on github and standard markdown.
- [dvanhoucke]
- First cookbook version

0 comments on commit d94fc1b

Please sign in to comment.