|
|
|
@ -24,10 +24,17 @@ jobs:
|
|
|
|
|
uses: crazy-max/ghaction-docker-buildx@v1
|
|
|
|
|
with:
|
|
|
|
|
version: latest
|
|
|
|
|
- name: log in to docker hub
|
|
|
|
|
run: |
|
|
|
|
|
echo "${{ secrets.DOCKER_PASSWORD }}" | \
|
|
|
|
|
docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
|
|
|
|
|
- name: Login to Docker Hub
|
|
|
|
|
uses: docker/login-action@v1
|
|
|
|
|
with:
|
|
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
|
- name: Login to ghcr.io
|
|
|
|
|
uses: docker/login-action@v1
|
|
|
|
|
with:
|
|
|
|
|
registry: ghcr.io
|
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
- name: build and push the image
|
|
|
|
|
if: startsWith(github.ref, 'refs/heads/main') && github.actor == 'benbusby'
|
|
|
|
|
run: |
|
|
|
|
@ -36,6 +43,9 @@ jobs:
|
|
|
|
|
docker buildx build --push \
|
|
|
|
|
--tag benbusby/whoogle-search:latest \
|
|
|
|
|
--platform linux/amd64,linux/arm/v7,linux/arm64 .
|
|
|
|
|
docker buildx build --push \
|
|
|
|
|
--tag ghcr.io/benbusby/whoogle-search:latest \
|
|
|
|
|
--platform linux/amd64,linux/arm/v7,linux/arm64 .
|
|
|
|
|
- name: build and push tag
|
|
|
|
|
if: startsWith(github.ref, 'refs/tags')
|
|
|
|
|
run: |
|
|
|
|
@ -44,3 +54,6 @@ jobs:
|
|
|
|
|
docker buildx build --push \
|
|
|
|
|
--tag benbusby/whoogle-search:${GITHUB_REF#refs/*/v}\
|
|
|
|
|
--platform linux/amd64,linux/arm/v7,linux/arm64 .
|
|
|
|
|
docker buildx build --push \
|
|
|
|
|
--tag ghcr.io/benbusby/whoogle-search:${GITHUB_REF#refs/*/v}\
|
|
|
|
|
--platform linux/amd64,linux/arm/v7,linux/arm64 .
|
|
|
|
|