Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
KrisPett committed Dec 2, 2023
1 parent 9b6037b commit 392f59a
Showing 1 changed file with 40 additions and 48 deletions.
88 changes: 40 additions & 48 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,51 +18,43 @@ jobs:
contents: read
packages: write
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21.3'

- name: Build
run: go build -v ./...

- name: Test
run: go test -v ./...

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

# - name: Login to GitHub Container Registry
# uses: docker/login-action@v3
# with:
# registry: docker.pkg.github.com
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name : Get metadata
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: latest

- name: Build and Push Docker Image
uses: docker/build-push-action@v5
with:
context: .
push: true
# tags: docker.pkg.github.com/krispett/chaincue-real-estate-go/app:latest
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21.3'

- name: Build
run: go build -v ./...

- name: Test
run: go test -v ./...

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Get metadata
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: latest

- name: Build and Push Docker Image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 392f59a

Please sign in to comment.