diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 4c2e79686..4853bc2bf 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -24,7 +24,8 @@ jobs: VERSION=${GITHUB_REF#refs/tags/} elif [[ $GITHUB_REF == refs/heads/* ]]; then VERSION=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's#/+#-#g') - if [ "${{ github.event.repository.default_branch }}" = "$VERSION" ]; then + DEFAULT_BRANCH=$(git rev-parse --abbrev-ref HEAD) + if [ "$DEFAULT_BRANCH" = "$VERSION" ]; then VERSION=latest fi fi @@ -34,13 +35,13 @@ jobs: fi echo ::set-output name=tags::${TAGS} - - name: Set up QEMU - uses: docker/setup-qemu-action@master - with: - platforms: all +# - name: Set up QEMU +# uses: docker/setup-qemu-action@master +# with: +# platforms: all - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 +# - name: Set up Docker Buildx +# uses: docker/setup-buildx-action@v1 # - name: Login to DockerHub # if: ${{ github.event_name != 'pull_request' }} @@ -49,11 +50,11 @@ jobs: # username: ${{ secrets.DOCKERHUB_USERNAME }} # password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Publish to Docker Hub - uses: docker/build-push-action@v2 - with: - context: . - file: ./DOCKER/Dockerfile - platforms: linux/amd64,linux/arm64 - #push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.prep.outputs.tags }} +# - name: Publish to Docker Hub +# uses: docker/build-push-action@v2 +# with: +# context: . +# file: ./DOCKER/Dockerfile +# platforms: linux/amd64,linux/arm64 +# push: ${{ github.event_name != 'pull_request' }} +# tags: ${{ steps.prep.outputs.tags }} diff --git a/.github/workflows/proto-docker.yml b/.github/workflows/proto-docker.yml index e1d0b7fbd..cba245941 100644 --- a/.github/workflows/proto-docker.yml +++ b/.github/workflows/proto-docker.yml @@ -3,9 +3,11 @@ on: pull_request: paths: - "tools/proto/*" -# push: -# paths: -# - "tools/proto/*" + push: + branches: + - main + paths: + - "tools/proto/*" schedule: # run this job once a month to recieve any go or buf updates - cron: "* * 1 * *" @@ -24,15 +26,16 @@ jobs: VERSION=${GITHUB_REF#refs/tags/} elif [[ $GITHUB_REF == refs/heads/* ]]; then VERSION=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's#/+#-#g') - if [ "${{ github.event.repository.default_branch }}" = "$VERSION" ]; then + DEFAULT_BRANCH=$(git rev-parse --abbrev-ref HEAD) + if [ "$DEFAULT_BRANCH" = "$VERSION" ]; then VERSION=latest fi fi TAGS="${DOCKER_IMAGE}:${VERSION}" echo ::set-output name=tags::${TAGS} - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 +# - name: Set up Docker Buildx +# uses: docker/setup-buildx-action@v1 # - name: Login to DockerHub # uses: docker/login-action@v1 @@ -40,10 +43,10 @@ jobs: # username: ${{ secrets.DOCKERHUB_USERNAME }} # password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Publish to Docker Hub - uses: docker/build-push-action@v2 - with: - context: ./tools/proto - file: ./tools/proto/Dockerfile - push: false #${{ github.event_name != 'pull_request' }} - tags: ${{ steps.prep.outputs.tags }} +# - name: Publish to Docker Hub +# uses: docker/build-push-action@v2 +# with: +# context: ./tools/proto +# file: ./tools/proto/Dockerfile +# push: ${{ github.event_name != 'pull_request' }} +# tags: ${{ steps.prep.outputs.tags }}