diff --git a/.github/workflows/build-gdb.yml b/.github/workflows/build-gdb.yml index 710af0d..f49ca30 100644 --- a/.github/workflows/build-gdb.yml +++ b/.github/workflows/build-gdb.yml @@ -127,6 +127,8 @@ jobs: name: Create GDB & gdbserver Release runs-on: ubuntu-latest needs: [build-x86, build-x86_64, build-armhf, build-aarch64] + permissions: + contents: write steps: - name: Checkout uses: actions/checkout@v2 @@ -142,11 +144,14 @@ jobs: - name: List Artifacts run: ls -laR /tmp/releases + - name: Fetch tags + run: git fetch --tags --prune --quiet + - name: Tag Release id: tag_release run: | set +e - if git rev-list "gdb-v${{ needs.build-x86.outputs.version }}".. >/dev/null;then + if git rev-list "gdb-v${{ needs.build-x86.outputs.version }}" >/dev/null;then echo "Tag for gdb-v${{ needs.build-x86.outputs.version }} already exists. Skipping release creation." echo ::set-output name=NEW_RELEASE::"false" else @@ -162,4 +167,4 @@ jobs: name: gdb-v${{ needs.build-x86.outputs.version }} tag: gdb-v${{ needs.build-x86.outputs.version }} artifacts: "/tmp/releases/*/*" - token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/build-nmap.yml b/.github/workflows/build-nmap.yml index 33f0d3d..6795d6b 100644 --- a/.github/workflows/build-nmap.yml +++ b/.github/workflows/build-nmap.yml @@ -129,6 +129,8 @@ jobs: name: Create Nmap Release runs-on: ubuntu-latest needs: [build-x86, build-x86_64, build-armhf, build-aarch64] + permissions: + contents: write steps: - name: Checkout uses: actions/checkout@v2 @@ -144,12 +146,14 @@ jobs: - name: List Artifacts run: ls -laR /tmp/releases + - name: Fetch tags + run: git fetch --tags --prune --quiet + - name: Tag Release id: tag_release run: | set +e - git fetch --quiet --prune --tags - if [[ $(git tag -l | grep nmap-v${{ needs.build-x86.outputs.version }} | wc -l) -gt 0 ]]; then + if git rev-list "nmap-v${{ needs.build-x86.outputs.version }}" >/dev/null;then echo "Tag for nmap-v${{ needs.build-x86.outputs.version }} already exists. Skipping release creation." echo "NEW_RELEASE=false" >> $GITHUB_OUTPUT else diff --git a/.github/workflows/build-openssh.yml b/.github/workflows/build-openssh.yml index de32095..f13bf0d 100644 --- a/.github/workflows/build-openssh.yml +++ b/.github/workflows/build-openssh.yml @@ -92,6 +92,8 @@ jobs: name: Create OpenSSH Release runs-on: ubuntu-latest needs: [build-x86, build-x86_64, build-armhf, build-aarch64] + permissions: + contents: write steps: - name: Checkout uses: actions/checkout@v2 @@ -107,11 +109,14 @@ jobs: - name: List Artifacts run: ls -laR /tmp/releases + - name: Fetch tags + run: git fetch --tags --prune --quiet + - name: Tag Release id: tag_release run: | set +e - if git rev-list "openssh-v${{ needs.build-x86.outputs.version }}".. >/dev/null;then + if git rev-list "openssh-v${{ needs.build-x86.outputs.version }}" >/dev/null;then echo "Tag for openssh-v${{ needs.build-x86.outputs.version }} already exists. Skipping release creation." echo "NEW_RELEASE=false" >> $GITHUB_OUTPUT else @@ -127,4 +132,4 @@ jobs: name: openssh-v${{ needs.build-x86.outputs.version }} tag: openssh-v${{ needs.build-x86.outputs.version }} artifacts: "/tmp/releases/*/*" - token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/build-socat.yml b/.github/workflows/build-socat.yml index bee15b4..d20a862 100644 --- a/.github/workflows/build-socat.yml +++ b/.github/workflows/build-socat.yml @@ -184,6 +184,8 @@ jobs: name: Create socat Release runs-on: ubuntu-latest needs: [build-x86, build-x86_64, build-armhf, build-aarch64, build-ppc32, build-ppc64] + permissions: + contents: write steps: - name: Checkout uses: actions/checkout@v2 @@ -199,11 +201,14 @@ jobs: - name: List Artifacts run: ls -laR /tmp/releases + - name: Fetch tags + run: git fetch --tags --prune --quiet + - name: Tag Release id: tag_release run: | set +e - if git rev-list "socat-v${{ needs.build-x86.outputs.version }}".. >/dev/null;then + if git rev-list "socat-v${{ needs.build-x86.outputs.version }}" >/dev/null;then echo "Tag for socat-v${{ needs.build-x86.outputs.version }} already exists. Skipping release creation." echo "NEW_RELEASE=false" >> $GITHUB_OUTPUT else @@ -219,4 +224,4 @@ jobs: name: socat-v${{ needs.build-x86.outputs.version }} tag: socat-v${{ needs.build-x86.outputs.version }} artifacts: "/tmp/releases/*/*" - token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/build-strace.yml b/.github/workflows/build-strace.yml index c5a426a..41630fa 100644 --- a/.github/workflows/build-strace.yml +++ b/.github/workflows/build-strace.yml @@ -128,6 +128,8 @@ jobs: name: Create strace Release runs-on: ubuntu-latest needs: [build-x86, build-x86_64, build-armhf, build-aarch64] + permissions: + contents: write steps: - name: Checkout uses: actions/checkout@v2 @@ -143,11 +145,14 @@ jobs: - name: List Artifacts run: ls -laR /tmp/releases + - name: Fetch tags + run: git fetch --tags --prune --quiet + - name: Tag Release id: tag_release run: | set +e - if git rev-list "strace-v${{ needs.build-x86.outputs.version }}".. >/dev/null;then + if git rev-list "strace-v${{ needs.build-x86.outputs.version }}" >/dev/null;then echo "Tag for strace-v${{ needs.build-x86.outputs.version }} already exists. Skipping release creation." echo "NEW_RELEASE=false" >> $GITHUB_OUTPUT else @@ -163,4 +168,4 @@ jobs: name: strace-v${{ needs.build-x86.outputs.version }} tag: strace-v${{ needs.build-x86.outputs.version }} artifacts: "/tmp/releases/*/*" - token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/build-tcpdump.yml b/.github/workflows/build-tcpdump.yml index 080857c..67c3f69 100644 --- a/.github/workflows/build-tcpdump.yml +++ b/.github/workflows/build-tcpdump.yml @@ -92,6 +92,8 @@ jobs: name: Create tcpdump Release runs-on: ubuntu-latest needs: [build-x86, build-x86_64, build-armhf, build-aarch64] + permissions: + contents: write steps: - name: Checkout uses: actions/checkout@v2 @@ -107,10 +109,14 @@ jobs: - name: List Artifacts run: ls -laR /tmp/releases + - name: Fetch tags + run: git fetch --tags --prune --quiet + - name: Tag Release + id: tag_release run: | set +e - if git rev-list "tcpdump-v${{ needs.build-x86.outputs.version }}".. >/dev/null;then + if git rev-list "tcpdump-v${{ needs.build-x86.outputs.version }}" >/dev/null;then echo "Tag for tcpdump-v${{ needs.build-x86.outputs.version }} already exists. Skipping release creation." echo "NEW_RELEASE=false" >> $GITHUB_OUTPUT else