mirror of
https://github.com/pcvolkmer/idicon.git
synced 2025-07-01 19:32:54 +00:00
Change Github workflow to deploy docker image
This commit is contained in:
34
.github/workflows/go-deploy.yml
vendored
Normal file
34
.github/workflows/go-deploy.yml
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
name: Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master", "main" ]
|
||||
pull_request:
|
||||
branches: [ "master", "main" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: '1.20'
|
||||
|
||||
- run: go test
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Login to ghcr.io
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Execute image build and push
|
||||
run: |
|
||||
docker build -t ghcr.io/pcvolkmer/idicon .
|
||||
docker push ghcr.io/pcvolkmer/idicon
|
17
.github/workflows/go-test.yml
vendored
17
.github/workflows/go-test.yml
vendored
@ -1,17 +0,0 @@
|
||||
name: Go test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master", "main" ]
|
||||
pull_request:
|
||||
branches: [ "master", "main" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: '1.20'
|
||||
- run: go test
|
Reference in New Issue
Block a user