Fix gettings tags on publish (#75) #129
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: PR/main branch CI | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
make-tests: | |
env: | |
PACT_VERSION: ${{ github.sha }} | |
PACT_BROKER_BASE_URL: ${{ vars.PACT_BROKER_BASE_URL }} | |
PACT_BROKER_TOKEN: ${{ secrets.PACT_BROKER_TOKEN }} | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '^1.20' | |
- uses: replicatedhq/action-install-pact@v1 | |
- run: make test | |
- if: github.event_name == 'push' || ( github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository ) | |
run: make publish-pact | |
- if: github.event_name == 'push' || ( github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository ) | |
run: | | |
make can-i-deploy || echo "::warning:: can-i-deploy says no; provider(s) must successfully verify before release" | |
make-build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '^1.20' | |
- name: make build | |
run: make build | |
build-and-push-ttl-image: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: build and push sdk for e2e | |
uses: docker/build-push-action@v3 | |
with: | |
tags: ttl.sh/automated-${{ github.run_id }}/replicated-sdk:24h | |
context: ./ | |
file: ./Dockerfile | |
push: false # we don't need to push the image since we don't have any e2e tests yet |