chore(release): v0.85.0-rhobs1 #32
This file contains hidden or 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
| # This workflow creates a git tag and publishes container images | |
| name: rhobs release | |
| on: | |
| push: | |
| branches: | |
| - 'rhobs-rel-**' | |
| jobs: | |
| debug: | |
| runs-on: ubuntu-latest | |
| if: "!startsWith(github.event.head_commit.message, 'chore(release):')" | |
| steps: | |
| - name: Debug | |
| run: | | |
| echo "Skipping release workflow since commit message does match the convention" | |
| create-release: | |
| runs-on: ubuntu-latest | |
| if: "startsWith(github.event.head_commit.message, 'chore(release):')" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Import common environment variables | |
| run: cat ".github/env" >> "$GITHUB_ENV" | |
| - name: Install Go | |
| uses: actions/setup-go@v3 | |
| with: | |
| go-version: '${{ env.golang-version }}' | |
| - name: login to quay.io | |
| uses: docker/login-action@v2 | |
| with: | |
| registry: quay.io | |
| username: ${{ secrets.quay_repo_username }} | |
| password: ${{ secrets.quay_repo_password }} | |
| - name: create git tag | |
| id: git_tag | |
| run: | | |
| version="$(head -1 VERSION)" | |
| git config user.name rhobs-release-bot | |
| git config user.email release-bot@monitoring.rhobs.io | |
| git tag -a "v${version}" -m "v${version}" | |
| git tag -a "pkg/apis/monitoring/v${version}" -m "v${version}" | |
| git tag -a "pkg/client/v${version}" -m "v${version}" | |
| - name: Build RHOBS images and push | |
| env: | |
| IMAGE_ORG: ${{ secrets.IMAGE_ORG }} | |
| run: | | |
| REGISTRIES="quay.io" \ | |
| IMAGE_ORG="$IMAGE_ORG" \ | |
| CPU_ARCHS="amd64" \ | |
| TAG="v$(head -1 VERSION)" \ | |
| ./rhobs/push-container-images.sh | |
| cd rhobs/olm | |
| make tools | |
| make bundle-image bundle-push IMAGE_REPO=quay.io/"$IMAGE_ORG" | |
| - name: push git tags | |
| run: | | |
| git push --tags | |
| - name: test if rhobs fork can be imported | |
| run: | | |
| [[ "$IMAGE_ORG" != "rhobs" ]] && { | |
| echo "Skipping import tests on forked repos" | |
| exit 0 | |
| } | |
| cd rhobs/test/import | |
| go mod tidy | |
| go test ./... |