Skip to content

Commit

Permalink
add docker action
Browse files Browse the repository at this point in the history
  • Loading branch information
mat committed Nov 13, 2024
1 parent 435c48c commit 723f25e
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# github action to Build and publish Docker image

name: Docker

on:
push:
branches: [ master ]

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v4

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Build
run: go get github.com/mat/besticon/...

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build Docker image
run: docker build --platform=linux/amd64 -t matthiasluedtke/iconserver:latest .


# - name: Tag Docker image
# run: docker tag besticon "${{ secrets.DOCKER_USERNAME }}/besticon"

- name: Push Docker image
run: docker push "${{ vars.DOCKERHUB_USERNAME }}/besticon"

0 comments on commit 723f25e

Please sign in to comment.