Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

Tag & Go List

Tag & Go List #36

Workflow file for this run

name: Tag & Go List
on:
workflow_run:
workflows: ["Lint & Test"]
branches: [main]
types:
- completed
jobs:
release:
runs-on: ubuntu-22.04
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
outputs:
version: ${{ steps.semantic.outputs.release-version }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- name: Set up cache
uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Tag
uses: codfish/semantic-release-action@v2.0.0
id: semantic
with:
branches: |
['main']
tag_format: "v${version}"
additional_packages: |
['@semantic-release/commit-analyzer']
plugins: |
['@semantic-release/commit-analyzer']
- name: Go List
if: steps.semantic.outputs.new-release-published == 'true'
run: GOPROXY=proxy.golang.org go list -m github.com/pokt-foundation/transaction-db@v${{ steps.semantic.outputs.release-version }}
docker:
if: needs.release.outputs.version
name: Docker Build & Push
needs: [release]
timeout-minutes: 15
runs-on: ubuntu-22.04
environment: CI
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker images
uses: docker/build-push-action@v3
with:
push: true
context: .
file: ./Dockerfile
tags: |
pocketfoundation/test-transaction-postgres:latest
pocketfoundation/test-transaction-postgres:${{ needs.release.outputs.version }}