ci: moving permissions to global job #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Beta Release | |
on: | |
push: | |
branches: ["develop"] | |
permissions: write-all | |
jobs: | |
beta: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Build the Image | |
run: docker build --tag ghcr.io/${{ github.repository }}:${{ github.sha }} . | |
- name: Running beta release | |
run: | | |
docker run \ | |
-e GITHUB_TOKEN=${GITHUB_TOKEN} \ | |
-e GIT_DIRECTORY="/app" \ | |
-e GIT_EMAIL=${GIT_EMAIL} \ | |
-e GIT_USERNAME="${GIT_USERNAME}" \ | |
-e GPG_PRIVATE_KEY="${GPG_PRIVATE_KEY}" \ | |
-e GPG_PRIVATE_KEY_ID="${GPG_PRIVATE_KEY_ID}" \ | |
-e RELEASE_IT_PLUGINS="@release-it/conventional-changelog@latest" \ | |
-e SSH_PRIVATE_KEY_FILE="${SSH_PRIVATE_KEY_FILE}" \ | |
-u root \ | |
-v $PWD:/app \ | |
ghcr.io/${{ github.repository }}:${{ github.sha }} \ | |
release-it --ci --preRelease=beta | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GIT_EMAIL: ${{ vars.GIT_EMAIL }} | |
GIT_USERNAME: ${{ vars.GIT_USERNAME }} | |
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | |
GPG_PRIVATE_KEY_ID: ${{ secrets.GPG_PRIVATE_KEY_ID }} | |
SSH_PRIVATE_KEY_FILE: ${{ secrets.SSH_PRIVATE_KEY_FILE }} |