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

updating with new ci-robot account #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ jobs:
build:

runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{secrets.BF2ROBOT_TOKEN}}
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
with:
token: ${{secrets.BF2ROBOT_TOKEN}}

- name: Set up JDK 11
uses: actions/setup-java@v2
Expand Down Expand Up @@ -44,8 +48,7 @@ jobs:
/usr/bin/sudo gpasswd -a $USER docker
/usr/bin/sudo setfacl -m user:$USER:rw /var/run/docker.sock
/usr/bin/sudo service docker restart
sed 's/{{TOKEN}}/${{ secrets.BF2_GITHUB_TOKEN }}/g' settings.xml > ~/settings.xml
mvn --batch-mode install -s ~/settings.xml --file pom.xml --no-transfer-progress -Dno-format -P docker -Ddocker.repo=${{ secrets.IMAGE_REPO_HOSTNAME }} -Ddocker.organization=${{ secrets.IMAGE_REPO_NAMESPACE }}
mvn --batch-mode install --file pom.xml -Dgithub.token=${{ secrets.GITHUB_TOKEN }} --no-transfer-progress -Dno-format -P docker -Ddocker.repo=${{ secrets.IMAGE_REPO_HOSTNAME }} -Ddocker.organization=${{ secrets.IMAGE_REPO_NAMESPACE }}
docker login -u="${{ secrets.IMAGE_REPO_USERNAME }}" -p="${{ secrets.IMAGE_REPO_PASSWORD }}" ${{ secrets.IMAGE_REPO_HOSTNAME }}
docker push ${{ secrets.IMAGE_REPO_HOSTNAME }}/${{ secrets.IMAGE_REPO_NAMESPACE }}/openmessaging-benchmark:${{ steps.project.outputs.version }}
docker tag ${{ secrets.IMAGE_REPO_HOSTNAME }}/${{ secrets.IMAGE_REPO_NAMESPACE }}/openmessaging-benchmark:${{ steps.project.outputs.version }} ${{ secrets.IMAGE_REPO_HOSTNAME }}/${{ secrets.IMAGE_REPO_NAMESPACE }}/openmessaging-benchmark:latest
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,23 @@ jobs:
name: release
if: ${{github.event.pull_request.merged == true}}
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{secrets.BF2ROBOT_TOKEN}}
permissions:
contents: read
packages: write

steps:
- name: checkout
uses: actions/checkout@v2
with:
token: ${{secrets.BF2ROBOT_TOKEN}}

- name: Retrieve Project Metadata
uses: radcortez/project-metadata-action@243817f1e0f2b4df4e012fc17efc45cff166425d
id: metadata
with:
github-token: ${{secrets.GITHUB_TOKEN}}
metadata-file-path: '.github/project.yml'
local-file: true

Expand Down Expand Up @@ -53,13 +58,13 @@ jobs:

- name: Build and run Unit tests
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "bf2robot"
git config --global user.email "bf2-admin+bf2robot@redhat.com"
git checkout -b release
mvn -B release:prepare -DpushChanges=false -s settings.xml -Dgithub.token=${{ secrets.GITHUB_TOKEN }} -P docker -DreleaseVersion=${{ steps.metadata.outputs.current-version }} -DdevelopmentVersion=${{ steps.metadata.outputs.next-version }} -Ddocker.repo=${{ secrets.IMAGE_REPO_HOSTNAME }} -Ddocker.organization=${{ secrets.IMAGE_REPO_NAMESPACE }}
mvn -B release:prepare -DpushChanges=false -Dgithub.token=${{ secrets.GITHUB_TOKEN }} -P docker -DreleaseVersion=${{ steps.metadata.outputs.current-version }} -DdevelopmentVersion=${{ steps.metadata.outputs.next-version }} -Ddocker.repo=${{ secrets.IMAGE_REPO_HOSTNAME }} -Ddocker.organization=${{ secrets.IMAGE_REPO_NAMESPACE }}
git checkout ${{github.base_ref}}
git rebase release
mvn -B release:perform -DlocalCheckout=true -s settings.xml -Dgithub.token=${{ secrets.GITHUB_TOKEN }}
mvn -B release:perform -DlocalCheckout=true -Dgithub.token=${{ secrets.GITHUB_TOKEN }}

- name: docker push
run: |
Expand Down
56 changes: 0 additions & 56 deletions settings.xml

This file was deleted.