Fix logic #94
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: Release | |
on: | |
push: | |
branches: | |
- "main" | |
env: | |
REGISTRY: ghcr.io | |
jobs: | |
test: | |
name: Tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.21" | |
- name: Test | |
run: go test -v ./... | |
push: | |
name: Push | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- name: Setup Docker buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/checkout@v3 | |
name: Check out code | |
- name: Construct profile-server metadata | |
id: profile-server-meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.REGISTRY }}/TheLab-ms/profile | |
tags: | | |
type=sha | |
- name: Push profile-server image | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
file: ./cmd/profile-server/Dockerfile | |
tags: ${{ steps.profile-server-meta.outputs.tags }} | |
labels: ${{ steps.profile-server-meta.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: Construct visit-check-job metadata | |
id: visit-check-job-meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.REGISTRY }}/TheLab-ms/profile/visit-check-job | |
tags: | | |
type=sha | |
- name: Push visit-check-job image | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
file: ./cmd/visit-check-job/Dockerfile | |
tags: ${{ steps.visit-check-job-meta.outputs.tags }} | |
labels: ${{ steps.visit-check-job-meta.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: Construct paypal-check-job metadata | |
id: paypal-check-job-meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.REGISTRY }}/TheLab-ms/profile/paypal-check-job | |
tags: | | |
type=sha | |
- name: Push paypal-check-job image | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
file: ./cmd/paypal-check-job/Dockerfile | |
tags: ${{ steps.paypal-check-job-meta.outputs.tags }} | |
labels: ${{ steps.paypal-check-job-meta.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: Construct profile-async metadata | |
id: profile-async-meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.REGISTRY }}/TheLab-ms/profile/profile-async | |
tags: | | |
type=sha | |
- name: Push profile-async image | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
file: ./cmd/profile-async/Dockerfile | |
tags: ${{ steps.profile-async-meta.outputs.tags }} | |
labels: ${{ steps.profile-async-meta.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |