fix: update apt #18
This file contains 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
name: integration | |
on: | |
push: | |
branches: [ master, main ] | |
jobs: | |
set-version: | |
runs-on: ubuntu-latest | |
container: | |
image: mcr.microsoft.com/dotnet/sdk:6.0 | |
outputs: | |
semVer: ${{ steps.gitversion.outputs.semVer }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: install deps | |
run: | | |
git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
- name: Install GitVersion | |
uses: gittools/actions/gitversion/setup@v1 | |
with: | |
versionSpec: '5.x' | |
- name: Set SemVer Version | |
uses: gittools/actions/gitversion/execute@v1 | |
id: gitversion | |
test: | |
runs-on: ubuntu-latest | |
container: | |
image: golang:1.22-bullseye | |
needs: set-version | |
env: | |
SEMVER: ${{ needs.set-version.outputs.semVer }} | |
GIT_TAG: ${{ needs.set-version.outputs.semVer }} | |
GOVCS: false | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: install deps | |
run: | | |
git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
git config user.email ${{ github.actor }}[email protected] | |
git config user.name ${{ github.actor }} | |
- name: Install Task | |
uses: arduino/setup-task@v2 | |
with: | |
version: 3.37.0 | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run tests pre-release | |
run: | | |
task test-seeder | |
- name: Publish Junit style Test Report | |
uses: mikepenz/action-junit-report@v3 | |
if: always() # always run even if the previous step fails | |
with: | |
report_paths: '**/.coverage/report-junit.xml' | |
- name: Analyze with SonarCloud | |
# You can pin the exact commit or the version. | |
uses: SonarSource/sonarcloud-github-action@master | |
env: | |
SEMVER: $SEMVER | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
with: | |
args: | |
-Dsonar.projectVersion=${{ needs.set-version.outputs.semVer }} | |
-Dsonar.go.tests.reportPaths=/github/workspace/controller/.coverage/report-junit.xml,/github/workspace/seeder/.coverage/report-junit.xml,/github/workspace/kubebuilder-controller/.coverage/report-junit.xml | |
-Dsonar.go.coverage.reportPaths=/github/workspace/controller/.coverage/out,/github/workspace/seeder/.coverage/out,/github/workspace/kubebuilder-controller/.coverage/out | |
publish-binary: | |
name: tag repo and publish binary | |
runs-on: ubuntu-latest | |
container: | |
image: golang:1.22-bullseye | |
needs: | |
- set-version | |
- test | |
env: | |
SEMVER: ${{ needs.set-version.outputs.semVer }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install Task | |
uses: arduino/setup-task@v2 | |
with: | |
version: 3.37.0 | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: generate binaries | |
run: | | |
git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
git config user.email ${{ github.actor }}[email protected] | |
git config user.name ${{ github.actor }} | |
task build-seeder GIT_TAG=$SEMVER REVISION=${{ github.sha }} PAT=${{ secrets.GITHUB_TOKEN }} | |
# - name: release library | |
# run: | | |
# make GIT_TAG=$SEMVER REVISION=${{ github.sha }} tag | |
- name: release cli | |
run: | | |
apt-get update && apt-get install jq -y | |
task publish-seeder PAT=${{ secrets.GITHUB_TOKEN }} GIT_TAG=$SEMVER REVISION=${{ github.sha }} | |
# publish-docker-image: | |
# name: build docker image and push to gchr | |
# # run only when code is compiling and tests are passing | |
# runs-on: ubuntu-latest | |
# # steps to perform in job | |
# needs: | |
# - set-version | |
# - test | |
# env: | |
# SEMVER: ${{ needs.set-version.outputs.semVer }} | |
# steps: | |
# - name: Checkout code | |
# uses: actions/checkout@v3 | |
# # setup Docker buld action | |
# - name: Set up Docker Buildx | |
# id: buildx | |
# uses: docker/setup-buildx-action@v2 | |
# - name: Login to Github Packages | |
# uses: docker/login-action@v2 | |
# with: | |
# registry: ghcr.io | |
# username: ${{ github.actor }} | |
# password: ${{ secrets.GITHUB_TOKEN }} | |
# - name: docker push controller | |
# run: | | |
# echo "SemVer: $SEMVER" | |
# make GIT_TAG=$SEMVER REVISION=${{ github.sha }} docker_release |