ci(fix): Attempt to fix release.yml (#2293) #65
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: Docker Main Build | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
docker-main-build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3.2.0 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3.8.0 | |
with: | |
version: v0.14.1 | |
driver-opts: | | |
image=moby/buildkit:buildx-stable-1 | |
network=host | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Login to GHCR | |
uses: docker/login-action@v3.3.0 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Login to DockerHub | |
uses: docker/login-action@v3.3.0 | |
with: | |
# NOTE: DOCKERHUB_TOKEN and DOCKERHUB_USERNAME must be present in https://github.com/hairyhenderson/gomplate/settings | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build & Push (latest tag) | |
run: | | |
export srcrepo=${{ github.repository}} | |
make docker-multi COMMIT=${{ github.sha }} DOCKER_REPO=${srcrepo} BUILDX_ACTION=--push | |
docker buildx imagetools create -t gomplate/gomplate:latest ${srcrepo}:latest | |
docker buildx imagetools create -t gomplate/gomplate:alpine ${srcrepo}:alpine | |
docker buildx imagetools create -t ghcr.io/${srcrepo}:latest ${srcrepo}:latest | |
docker buildx imagetools create -t ghcr.io/${srcrepo}:alpine ${srcrepo}:alpine |