Skip to content

Commit

Permalink
fix(ci): Hotfix permissions for trivy push and docker login (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
toninis authored Mar 22, 2023
1 parent 02ac79d commit f4373bf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,14 @@ jobs:
- name: cd/build-docker
run: make build-image

- name: ci/docker-login
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: ci/push-docker
run: |
set -eu
echo $DOCKERHUB_TOKEN | docker login --username $DOCKERHUB_USERNAME --password-stdin
docker tag mattermost/mattermost-operator:test mattermost/mattermost-operator:$TAG
docker push mattermost/mattermost-operator:$TAG
env:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ jobs:

build:
if: ${{ github.event_name == 'pull_request' || github.ref_name == 'master' }}
permissions:
security-events: write
runs-on: ubuntu-latest
needs: [lint, test]
steps:
Expand Down

0 comments on commit f4373bf

Please sign in to comment.