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

Improvements to Github Actions #94

Merged
merged 1 commit into from
Apr 10, 2024
Merged
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: 1 addition & 6 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

- name: Build and push Docker image
- name: Build Docker image
run: make docker-build

lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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,
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,20 @@ on:
schedule:
- cron: "0 0 * * *"

env:
DAYS_BEFORE_STALE: 120
DAYS_BEFORE_CLOSE: 15

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GH_OMEC_PAT }}
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.'
repo-token: ${{ secrets.GITHUB_TOKEN }}
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 }}