Skip to content

Commit

Permalink
chore: Update permissions for shell scripts in GitHub workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
TheophileDiot committed Jul 15, 2024
1 parent e3255f2 commit 8ec183c
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/container-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Replace VERSION
if: inputs.RELEASE == 'testing' || inputs.RELEASE == 'dev'
run: ./misc/update-version.sh ${{ inputs.RELEASE }}
run: chmod +x ./misc/update-version.sh && ./misc/update-version.sh ${{ inputs.RELEASE }}
- name: Replace VERSION 1.6
if: inputs.RELEASE == '1.6'
run: ./misc/update-version.sh dev
run: chmod +x ./misc/update-version.sh && ./misc/update-version.sh dev
- name: Setup SSH for ARM node
if: inputs.CACHE_SUFFIX == 'arm'
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,6 @@ jobs:
SSH_IP: ${{ fromJson(steps.scw.outputs.json).public_ip.address }}
SSH_CONFIG: ${{ secrets.ARM_SSH_CONFIG }}
- name: Install Docker
run: ssh root@$SSH_IP "curl -fsSL https://test.docker.com -o test-docker.sh ; sh test-docker.sh ; echo 'ClientAliveInterval 60' >> /etc/ssh/sshd_config ; echo 'ClientAliveCountMax 0' >> /etc/ssh/sshd_config ; systemctl restart ssh"
run: ssh root@$SSH_IP "curl -fsSL https://test.docker.com -o test-docker.sh ; chmod +x test-docker.sh ; sh test-docker.sh ; echo 'ClientAliveInterval 60' >> /etc/ssh/sshd_config ; echo 'ClientAliveCountMax 0' >> /etc/ssh/sshd_config ; systemctl restart ssh"
env:
SSH_IP: ${{ fromJson(steps.scw.outputs.json).public_ip.address }}
6 changes: 3 additions & 3 deletions .github/workflows/linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Replace VERSION
if: inputs.RELEASE == 'testing' || inputs.RELEASE == 'dev' || inputs.RELEASE == 'ui'
run: ./misc/update-version.sh ${{ inputs.RELEASE }}
run: chmod +x ./misc/update-version.sh && ./misc/update-version.sh ${{ inputs.RELEASE }}
- name: Replace VERSION 1.6
if: inputs.RELEASE == '1.6'
run: ./misc/update-version.sh dev
run: chmod +x ./misc/update-version.sh && ./misc/update-version.sh dev
- name: Extract arch
run: |
echo "ARCH=${{ env.PLATFORMS }}" | sed 's/linux//g' | sed 's@/@@g' >> "$GITHUB_ENV"
Expand Down Expand Up @@ -119,7 +119,7 @@ jobs:
# Generate package
- name: Generate package
if: startsWith(env.ARCH, 'arm') == false
run: ./src/linux/package.sh ${{ inputs.LINUX }} ${{ env.LARCH }}
run: chmod +x ./src/linux/package.sh && ./src/linux/package.sh ${{ inputs.LINUX }} ${{ env.LARCH }}
env:
LARCH: ${{ env.LARCH }}
- name: Generate package (ARM)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
token: ${{ secrets.BUNKERBOT_TOKEN }}
- name: Replace VERSION
if: inputs.VERSION == 'testing'
run: ./misc/update-version.sh testing
run: chmod +x ./misc/update-version.sh && ./misc/update-version.sh testing
- name: Setup git user
run: |
git config --global user.name "BunkerBot"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/staging-create-infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
run: ansible-galaxy install --timeout 120 monolithprojects.github_actions_runner,1.18.7 && ansible-galaxy collection install --timeout 120 community.general && ansible-galaxy collection install --timeout 120 community.docker
if: inputs.TYPE != 'k8s'
# Create infra
- run: ./tests/create.sh ${{ inputs.TYPE }}
- run: chmod +x ./tests/create.sh && ./tests/create.sh ${{ inputs.TYPE }}
env:
CICD_SECRETS: ${{ secrets.CICD_SECRETS }}
- run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/staging-delete-infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ jobs:
continue-on-error: true
env:
KUBECONFIG: /tmp/k8s/kubeconfig
- run: ./tests/rm.sh ${{ inputs.TYPE }}
- run: chmod +x ./tests/rm.sh && ./tests/rm.sh ${{ inputs.TYPE }}
env:
CICD_SECRETS: ${{ secrets.CICD_SECRETS }}
1 change: 1 addition & 0 deletions .github/workflows/test-core-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,5 @@ jobs:
cd tests/core/${{ inputs.TEST }}
find . -name "requirements.txt" -exec pip install --break-system-packages --no-cache-dir --require-hashes --no-deps -r {} \;
sudo truncate -s 0 /var/log/bunkerweb/error.log
chmod +x ./test.sh
./test.sh "linux"
1 change: 1 addition & 0 deletions .github/workflows/test-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ jobs:
cd ./tests/core/${{ inputs.TEST }}
find . -type f -name 'docker-compose.*' -exec sed -i "s@bunkerity/bunkerweb:.*@bunkerweb-tests@" {} \;
find . -type f -name 'docker-compose.*' -exec sed -i "s@bunkerity/bunkerweb-scheduler:.*@scheduler-tests@" {} \;
chmod +x ./test.sh
./test.sh "docker" "${{ inputs.TEST }}"
1 change: 1 addition & 0 deletions .github/workflows/tests-ui-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ jobs:
zip discord.zip plugin.json
rm plugin.json
sudo truncate -s 0 /var/log/bunkerweb/error.log
chmod +x ./tests.sh
./tests.sh "linux" ${{ inputs.TEST }}
env:
MODE: ${{ inputs.RELEASE }}
1 change: 1 addition & 0 deletions .github/workflows/tests-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
- name: Run tests
run: |
cd ./tests/ui
chmod +x ./tests.sh
./tests.sh "docker" ${{ inputs.TEST }}
env:
MODE: ${{ inputs.RELEASE }}

0 comments on commit 8ec183c

Please sign in to comment.