Skip to content

Commit

Permalink
attempt to push to docker in GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
petetanton committed Mar 14, 2023
1 parent 9a58f67 commit 23fd104
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
on:
push:

env:
TEST_TAG: petetanton/klaxn-api:test
LATEST_TAG: petetanton/klaxn-api:latest
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -21,9 +23,27 @@ jobs:
with:
commit_message: Update swagger docs
file_pattern: 'docs/*'
- name: build
run: |
GOOS=linux go build -o klaxn-api main.go
# - name: build
# run: |
# GOOS=linux go build -o klaxn-api main.go
- 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.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and export to Docker
uses: docker/build-push-action@v4
with:
context: .
load: true
tags: ${{ env.TEST_TAG }}
# - name: Test
# run: |
# docker run --rm ${{ env.TEST_TAG }}
# integration-test:
# runs-on: ubuntu-latest
# services:
Expand Down

0 comments on commit 23fd104

Please sign in to comment.