Skip to content

Get CI/CD working again (VPS-11003) #25

Get CI/CD working again (VPS-11003)

Get CI/CD working again (VPS-11003) #25

Workflow file for this run

name: Main Workflow
on:
push:
branches: [master]
pull_request:
branches: [master]
env:
IMAGE_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
# If you want your CI build to push images to a Docker repository, define these
# for "Secrets" in your CI settings for the repository:
# private registry to push to
DOCKER_REGISTRY: ${{ secrets.VSCO_DOCKER_REGISTRY }}
# username at the registry
DOCKER_USERNAME: ${{ secrets.VSCO_DOCKER_REGISTRY_USERNAME }}
# the registry password for DOCKER_USERNAME
DOCKER_PASSWORD: ${{ secrets.VSCO_DOCKER_REGISTRY_PASSWORD }}
# repo to push to
DOCKER_REPO: ${{ secrets.DOCKER_REPO }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.14
- name: Run tests
run: script/test
- name: Build dcdr
run: script/build
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
registry: ${{ env.DOCKER_REGISTRY }}
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_PASSWORD }}
repository: ${{ env.DOCKER_REPO }}
dockerfile: Dockerfile.archlinux
tag_with_ref: true
tags: ${{ env.IMAGE_SHA }}
push: true