check login #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: Build base images | |
on: | |
push: | |
branches: | |
- 'main' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Log in to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
# - name: Build drupal-base-cli image | |
# run: docker build -t uselagoon/drupal-base-cli:latest -t drupal-base-cli -f ./lagoon/cli.dockerfile . | |
# - name: Build drupal-base-nginx image | |
# run: docker build -t uselagoon/drupal-base-nginx:latest -f ./lagoon/nginx.dockerfile . | |
# - name: Build drupal-base-php image | |
# run: docker build -t uselagoon/drupal-base-php:latest -f ./lagoon/php.dockerfile . | |
- name: Build Docker images | |
run: docker compose -f docker-compose.yml build | |
- name: Tag Docker images | |
run: | | |
docker tag drupal-base-cli:latest uselagoon/drupal-base-image-cli:latest | |
docker tag drupal-base-php:latest uselagoon/drupal-base-image-php:latest | |
docker tag drupal-base-nginx:latest uselagoon/drupal-base-image-nginx:latest | |
- name: List images | |
run: docker image ls | |
# - name: Push Docker images to Docker Hub | |
# run: | | |
# docker push uselagoon/drupal-base-image-cli:latest | |
# docker push uselagoon/drupal-base-image-php:latest | |
# docker push uselagoon/drupal-base-image-nginx:latest | |
# - name: Push Docker images to GitHub Container Registry | |
# run: docker push ghcr.io/your-github-username/your-app:latest |