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
  • Loading branch information
nyodas committed Apr 15, 2024
1 parent 18c0e01 commit 70c2a4a
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 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 @@ -21,6 +21,10 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: 1.21
- 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_$TARGET_PLATFORM
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_${{ matrix.platform }}
path: _output/release-tars
token: ${{ secrets.GITHUB_TOKEN }}
- name: Display structure of downloaded files
run: ls -R
working-directory: _output
Expand Down

0 comments on commit 70c2a4a

Please sign in to comment.