mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-02-06 12:00:48 +00:00
PR #3110 introduced a new action for performing the login to Dockerhub as part of image building and pushing however there is an error with the configuration and the credentials are not being passed through correctly. This change reverts to the previous log in approach. Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
49 lines
1012 B
YAML
49 lines
1012 B
YAML
name: Main CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
tags:
|
|
- '*'
|
|
|
|
jobs:
|
|
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.15
|
|
id: go
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set up QEMU
|
|
id: qemu
|
|
uses: docker/setup-qemu-action@v1
|
|
with:
|
|
platforms: all
|
|
|
|
- name: Set up Docker Buildx
|
|
id: buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
with:
|
|
version: latest
|
|
|
|
- name: Build
|
|
run: make local
|
|
|
|
- name: Test
|
|
run: make test
|
|
|
|
# Only try to publish the container image from the root repo; forks don't have permission to do so and will always get failures.
|
|
- name: Publish container image
|
|
if: github.repository == 'vmware-tanzu/velero'
|
|
run: |
|
|
docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }}
|
|
./hack/docker-push.sh
|