Skip to content

Commit

Permalink
Merge pull request #671 from sturman/update-github-actions
Browse files Browse the repository at this point in the history
ci: update GitHub actions
  • Loading branch information
dark0dave authored Jan 11, 2025
2 parents 5f5c2c1 + 4a45529 commit 2366d92
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 27 deletions.
39 changes: 17 additions & 22 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.0.2
- uses: actions/checkout@v4.2.2
- uses: actions/setup-python@v5
with:
set-safe-directory: true
- uses: actions/setup-python@v3
python-version: '3.x'
- uses: pre-commit/action@v3.0.0
test:
name: test
Expand All @@ -29,10 +29,9 @@ jobs:
- name: Install git
run: apk add --update --no-cache git
- name: Checkout code
uses: actions/checkout@v3.0.2
uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
set-safe-directory: true
- name: Test
run: |
scripts/alpine-setup.sh
Expand All @@ -52,10 +51,9 @@ jobs:
- name: Install git
run: apk add --update --no-cache git
- name: Checkout
uses: actions/checkout@v3.0.2
uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
set-safe-directory: true
- name: Build
run: |
git config --global --add safe.directory /__w/kube-no-trouble/kube-no-trouble
Expand All @@ -74,14 +72,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
set-safe-directory: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Build and push Docker image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
context: .
push: false
Expand Down Expand Up @@ -115,16 +112,15 @@ jobs:
]
steps:
- name: Checkout
uses: actions/checkout@v3.0.2
uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
set-safe-directory: true
- uses: actions/download-artifact@v4
with:
name: release-artifacts-linux-amd64
path: release-artifacts
- name: Create k8s Kind Cluster
uses: helm/kind-action@v1.10.0
uses: helm/kind-action@v1.12.0
with:
node_image: ${{ matrix.k8s_version }}
cluster_name: kubent-test-cluster
Expand All @@ -145,12 +141,11 @@ jobs:
tag_name: ${{ steps.get_tag.outputs.git_tag }}
steps:
- name: Checkout
uses: actions/checkout@v3.0.2
uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
set-safe-directory: true
- name: Generate a changelog
uses: orhun/git-cliff-action@v3
uses: orhun/git-cliff-action@v4
id: git-cliff
with:
config: cliff.toml
Expand All @@ -163,7 +158,7 @@ jobs:
path: release-artifacts
- name: Get the tag
id: get_tag
run: echo ::set-output name=git_tag::${GITHUB_REF/refs\/tags\//}
run: echo "git_tag=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
- name: Create Release
id: create_release
uses: actions/create-release@v1
Expand All @@ -186,17 +181,17 @@ jobs:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4.2.2
- name: Log in to the Container registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Build and push Docker image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
context: .
push: true
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3.0.2
uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
set-safe-directory: true
- name: Set tag name
id: git_tag
run: echo "::set-output name=tag::$(git describe --tags --match '[0-9].[0-9].[0-9]')"
run: echo "tag=$(git describe --tags --match '[0-9].[0-9].[0-9]')" >> "$GITHUB_OUTPUT"
- name: check if tag exists
id: tag_exists
run: |
set -x
exists=false
[ "$(git tag -l "${TAG}")" = "${TAG}" ] && exists=true
[ "$(git tag -l "nightly-${TAG}")" = "nightly-${TAG}" ] && exists=true
echo "::set-output name=result::${exists}"
echo "result=${exists}" >> "$GITHUB_OUTPUT"
env:
TAG: ${{ steps.git_tag.outputs.tag }}
- name: Setup SSH Keys and known_hosts
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v6
- uses: actions/stale@v9
with:
exempt-issue-labels: 'awaiting-approval,work-in-progress,not-stale'
exempt-pr-labels: 'awaiting-approval,work-in-progress,not-stale'
Expand Down

0 comments on commit 2366d92

Please sign in to comment.