Skip to content

benjamin-wright is publishing a new tag version #11

benjamin-wright is publishing a new tag version

benjamin-wright is publishing a new tag version #11

Workflow file for this run

name: Tag Publish
run-name: ${{ github.actor }} is publishing a new tag version
on:
push:
tags:
- '*'
jobs:
application:
runs-on: ubuntu-latest
environment: production
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USER_NAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22'
- name: Install dependencies
run: go mod download
- name: Build
run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -v -o ./dist/app ./cmd/operator/main.go
- name: Image
uses: docker/build-push-action@v4
with:
context: ./dist
file: ./deploy/Dockerfile
push: true
tags: benwright/db-operator:${{ github.ref_name }}
migrations:
runs-on: ubuntu-latest
environment: production
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USER_NAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22'
- name: Install dependencies
run: go mod download
- name: Build
run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -v -o ./dist/mig ./cmd/migrations/main.go
- name: Image
uses: docker/build-push-action@v4
with:
context: ./dist
file: ./deploy/Dockerfile
push: true
tags: benwright/db-pg-migrations:${{ github.ref_name }}
chart:
runs-on: ubuntu-latest
environment: production
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USER_NAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Install Helm
uses: azure/setup-helm@v3
- uses: actions/checkout@v3
- name: build
run: helm package deploy/chart --version ${{ github.ref_name }} --app-version ${{ github.ref_name }}
- name: push to dockerhub
run: helm push db-operator-chart-${{ github.ref_name }}.tgz oci://registry-1.docker.io/benwright