Use GitHub Actions and not ADO. #650
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: build-publish-from-fork | |
on: | |
workflow_dispatch: {} | |
push: {} | |
pull_request: {} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: github.repository != 'getporter/porter' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Login to DockerHub | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ github.token }} | |
- uses: actions/setup-go@v3 | |
with: | |
go-version-file: go.mod | |
cache: true | |
cache-dependency-path: go.sum | |
- name: Set up Mage | |
run: go run mage.go EnsureMage | |
- name: Publish | |
if: ${{ github.event_name != 'pull_request' }} | |
env: | |
PORTER_REGISTRY: ghcr.io/${{ github.repository }} | |
run: | | |
mage -v XBuildAll | |
mage -v PublishServerMultiArchImages |