Skip to content

Commit

Permalink
Merge pull request #258 from xwp/fix/travis-docker
Browse files Browse the repository at this point in the history
Let Travis use pre-built Docker images
  • Loading branch information
kasparsd authored Nov 9, 2023
2 parents 2b31114 + d788a83 commit f9cc9da
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ before_install:
- mkdir -p uploads

install:
- echo "$DOCKER_PASSWORD" | docker login ghcr.io -u "$DOCKER_USERNAME" --password-stdin || true
- docker-compose pull wordpress mkcert || true
- npm install

script:
Expand All @@ -22,6 +24,18 @@ script:

deploy:

# Build and deploy Docker images
- provider: script
script:
- sudo apt update
- sudo apt install -y docker-buildx
- docker buildx create --use
- docker buildx bake --push --progress=plain --set='*.platform=linux/amd64,linux/arm64'
skip_cleanup: true
on:
branch: master
condition: -n "$DOCKER_USERNAME" && -z $SKIP_DEPLOY

# Deploy to production.
- provider: script
script:
Expand Down
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ The following configuration must be requested from VIP Go to use this site repos

7. Remove these initial setup instructions from the README after the initial project setup.

Consider using a dedicated GitHub [machine user](https://docs.github.com/en/get-started/learning-about-github/types-of-github-accounts#personal-accounts) for deployments in case the deploy logic requires access to multiple private GitHub repositories as there can be only one custom key associated with the Travis CI repository and GitHub doesn't allow sharing the same deploy key accross multiple repositories.

## Setup 🛠

1. Clone this repository:
Expand Down

0 comments on commit f9cc9da

Please sign in to comment.