Skip to content

Commit

Permalink
fix: added prems and docker login
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielg2020 committed Apr 15, 2024
1 parent fa11a47 commit 0d69993
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:

permissions:
contents: read
packages: write

jobs:
release-please:
Expand Down Expand Up @@ -63,10 +64,6 @@ jobs:
- php/7.4/fpm-nginx
- php/8.0/fpm-nginx
- php/8.2/fpm-nginx
exclude:
- base: ${{ needs.release-please.outputs.release_created || contains(needs.orchestrator.outputs.changed-directories, 'php/7.4/fpm-nginx') && 'ignored' || 'php/7.4/fpm-nginx' }}
- base: ${{ needs.release-please.outputs.release_created || contains(needs.orchestrator.outputs.changed-directories, 'php/8.0/fpm-nginx') && 'ignored' || 'php/8.0/fpm-nginx' }}
- base: ${{ needs.release-please.outputs.release_created || contains(needs.orchestrator.outputs.changed-directories, 'php/8.2/fpm-nginx') && 'ignored' || 'php/8.2/fpm-nginx' }}
uses: ./.github/workflows/docker.yaml
with:
version: ${{ needs.release-please.outputs.release_created && needs.release-please.outputs.tag_name || github.sha}}
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ jobs:
# for tag in $MUTABLE_TAGS; do
# aws ecr batch-delete-image --repository-name $REPOSITORY --image-ids imageTag=$tag
# done
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.GHCR }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build ${{ inputs.push && 'and push ' || '' }}Docker image
id: build-and-push
Expand Down

0 comments on commit 0d69993

Please sign in to comment.