Skip to content

Commit

Permalink
Merge pull request #790 from PlanoramaEvents/development
Browse files Browse the repository at this point in the history
Updates the actions for build
  • Loading branch information
balen authored Feb 3, 2023
2 parents ba2ff73 + 75106d5 commit 5d41bf7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 26 deletions.
24 changes: 6 additions & 18 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
echo "Free space:"
df -h
- uses: actions/checkout@v2
- uses: actions/checkout@v3

#
# This section logs into registry for Github - so we push here as well as AWS for now
Expand Down Expand Up @@ -76,22 +76,10 @@ jobs:
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF##*/})"
id: extract_name

# ARE THE SECRETS ORG LEVEL AND DO WE HAVE ACCESS ????
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1

- name: Define the repository labels
run: |
echo "CONTAINER_TEST_REPOSITORY=${{ steps.login-ecr.outputs.registry }}/planorama:ci-${{ github.sha }}" >> $GITHUB_ENV
echo "CONTAINER_DEPLOY_REPOSITORY=${{ steps.login-ecr.outputs.registry }}/planorama:${{ steps.extract_name.outputs.branch }}" >> $GITHUB_ENV
echo "CONTAINER_TEST_REPOSITORY=ghcr.io/planoramaevents/planorama:ci-${{ github.sha }}" >> $GITHUB_ENV
echo "CONTAINER_DEPLOY_REPOSITORY=ghcr.io/planoramaevents/planorama:${{ steps.extract_name.outputs.branch }}" >> $GITHUB_ENV
- name: Set up Docker Buildx
id: buildx
Expand All @@ -104,7 +92,7 @@ jobs:
run: echo ${{ steps.buildx.outputs.platforms }}

- name: Cache Docker layers
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
Expand All @@ -113,7 +101,7 @@ jobs:
- name: Build the image
id: docker_build
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
context: ./
file: ./Dockerfile-prod
Expand Down Expand Up @@ -154,7 +142,7 @@ jobs:
#
- name: Push the image
id: docker_push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
context: ./
file: ./Dockerfile-prod
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ There are automated builds happening in Github and docker containers are stored
as well as a "latest" which is built when a release tag is done. To pull them use one of the following commands:

```
docker pull ghcr.io/chicagoworldcon/planorama:main
docker pull ghcr.io/chicagoworldcon/planorama:staging
docker pull ghcr.io/chicagoworldcon/planorama:development
docker pull ghcr.io/chicagoworldcon/planorama:latest
docker pull ghcr.io/planoramaevents/planorama:main
docker pull ghcr.io/planoramaevents/planorama:staging
docker pull ghcr.io/planoramaevents/planorama:development
docker pull ghcr.io/planoramaevents/planorama:latest
```

Latest will be the last build based on a tagged release.
Expand Down
4 changes: 2 additions & 2 deletions docker-compose-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ services:
command: "/opt/planorama/script/planorama_start.sh"
# planorama:latest for latest release (tagged)
# planorama:main for latest build of main branch
image: ghcr.io/PlanoramaEvents/planorama:latest
image: ghcr.io/planoramaevents/planorama:latest
ports:
- "127.0.0.1:3000:3000"
volumes:
Expand All @@ -52,7 +52,7 @@ services:
planorama-sidekiq:
command: "/opt/planorama/script/planorama_sidekiq.sh"
# See above note re which image to use
image: ghcr.io/PlanoramaEvents/planorama:latest
image: ghcr.io/planoramaevents/planorama:latest
volumes:
# NOTE: this will need to reflect local system
- /var/log/planorama/sidekiq:/opt/planorama/log
Expand Down
4 changes: 2 additions & 2 deletions docker-compose-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ services:

web:
command: "/opt/planorama/script/planorama_start.sh"
image: ghcr.io/PlanoramaEvents/planorama:staging
image: ghcr.io/planoramaevents/planorama:staging
ports:
- 3000:3000
volumes:
Expand All @@ -59,7 +59,7 @@ services:

planorama-sidekiq:
command: "/opt/planorama/script/planorama_sidekiq.sh"
image: ghcr.io/PlanoramaEvents/planorama:staging
image: ghcr.io/planoramaevents/planorama:staging
volumes:
# NOTE: this will need to reflect local system
- /var/log/planorama/sidekiq:/opt/planorama/log
Expand Down

0 comments on commit 5d41bf7

Please sign in to comment.