diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index ed8538b..c696966 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -25,17 +25,13 @@ jobs: - name: Build run: go build - unit-tests: + docker-build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version-file: 'go.mod' - - - name: Unit tests - run: go test ./... + - name: Build Docker image + run: make docker-build lint: runs-on: ubuntu-latest @@ -85,3 +81,15 @@ jobs: uses: fossa-contrib/fossa-action@v3 with: fossa-api-key: 0c3bbcdf20e157bbd487dae173751b28 + + unit-tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-go@v5 + with: + go-version-file: 'go.mod' + + - name: Unit tests + run: go test ./... diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index ad2c017..64f9534 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -12,6 +12,7 @@ on: jobs: push-images: runs-on: ubuntu-latest + if: github.repository_owner == 'omec-project' env: REGISTRY: registry.aetherproject.org DOCKER_REGISTRY: registry.aetherproject.org/ @@ -48,6 +49,7 @@ jobs: # CAUTION: Other actions depend on this name "tag-github" tag-github: runs-on: ubuntu-latest + if: github.repository_owner == 'omec-project' outputs: changed: ${{ steps.version-change.outputs.changed }} version: ${{ steps.version-change.outputs.version }} @@ -108,7 +110,7 @@ jobs: https://api.github.com/repos/${{ github.repository }}/releases \ -d '{ "tag_name": "v${{ steps.version-change.outputs.version }}", - "target_commitish": "master", + "target_commitish": "${{ github.event.repository.default_branch }}", "name": "v${{ steps.version-change.outputs.version }}", "draft": false, "prerelease": false, @@ -132,7 +134,7 @@ jobs: - uses: docker/login-action@v3.1.0 with: - registry: docker.io + registry: ${{ env.REGISTRY }} username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_PASSWORD }} diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 8c06556..e2d1964 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -6,6 +6,10 @@ on: schedule: - cron: "0 0 * * *" +env: + DAYS_BEFORE_STALE: 120 + DAYS_BEFORE_CLOSE: 15 + jobs: stale: runs-on: ubuntu-latest @@ -13,9 +17,9 @@ jobs: - uses: actions/stale@v9 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-issue-message: 'This issue has been stale for 30 days and will be closed in 5 days. Comment to keep it open.' - stale-pr-message: 'This pull request has been stale for 30 days and will be closed in 5 days. Comment to keep it open.' + stale-issue-message: 'This issue has been stale for ${{ env.DAYS_BEFORE_STALE }} days and will be closed in ${{ env.DAYS_BEFORE_CLOSE }} days. Comment to keep it open.' + stale-pr-message: 'This pull request has been stale for ${{ env.DAYS_BEFORE_STALE }} days and will be closed in ${{ env.DAYS_BEFORE_CLOSE }} days. Comment to keep it open.' stale-issue-label: 'stale/issue' stale-pr-label: 'stale/pr' - days-before-stale: 30 - days-before-close: 5 + days-before-stale: ${{ env.DAYS_BEFORE_STALE }} + days-before-close: ${{ env.DAYS_BEFORE_CLOSE }}