Skip to content

Commit

Permalink
[.github] - Update modules
Browse files Browse the repository at this point in the history
Update modules to newer version.
This should fix issue with permissions and deprecations warnings.
Without this the github action was not able to create releases

datadog:patch
  • Loading branch information
nyodas authored and rifelpet committed Jul 29, 2024
1 parent 44a8086 commit 82e3930
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions .github/workflows/dd-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
tags:
# Push events on datadog tags
- "*-dd*"

permissions: write-all
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -20,7 +20,11 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21
go-version: 1.22
- name: Set env
run: echo SANITIZED_TARGET_PLATFORM=${KUBE_BUILD_PLATFORM/\//-} >> $GITHUB_ENV
env:
KUBE_BUILD_PLATFORM: ${{ matrix.platform }}
- name: Cleanup disk space
run: |
sudo rm -rf /usr/share/dotnet
Expand All @@ -47,9 +51,13 @@ jobs:
done
- uses: actions/upload-artifact@v4
with:
name: k8s_output
name: k8s_output_${{ env.SANITIZED_TARGET_PLATFORM }}
path: _output/release-tars
env:
SANITIZED_TARGET_PLATFORM: ${{ env.SANITIZED_TARGET_PLATFORM }}
release:
permissions:
contents: write
runs-on: ubuntu-latest
needs: build
outputs:
Expand All @@ -64,16 +72,16 @@ jobs:
if: startsWith(github.ref, 'refs/heads/')
- name: Create Release for Branch
id: create_release_branch
uses: actions/create-release@v1
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/heads/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: branch@${{ steps.extract_branch.outputs.branch }}
tag_name: branch@${{ steps.extract_branch.outputs.branch }}
release_name: branch@${{ steps.extract_branch.outputs.branch }}
draft: false
prerelease: false

- name: Extract tags name
shell: bash
run: echo "##[set-output name=tags;]$(echo ${GITHUB_REF#refs/tags/})"
Expand All @@ -83,11 +91,13 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
- name: Create Release for Tags
id: create_release_tags
uses: actions/create-release@v1
uses: softprops/action-gh-release@v2
if: ${{ startsWith(github.ref, 'refs/tags/') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: ${{ steps.extract_tags.outputs.tags }}
tag_name: ${{ steps.extract_tags.outputs.tags }}
release_name: ${{ steps.extract_tags.outputs.tags }}
draft: false
Expand All @@ -105,10 +115,11 @@ jobs:
platform: ["linux-arm64","linux-amd64"]
extension: ["tar.gz", "tar.gz.sha256sum"]
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: k8s_output
name: k8s_output_${{ matrix.platform }}
path: _output/release-tars
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Display structure of downloaded files
run: ls -R
working-directory: _output
Expand Down

0 comments on commit 82e3930

Please sign in to comment.