Skip to content

Commit

Permalink
Adding publish pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
evozniak committed Oct 2, 2023
1 parent a1b3f3c commit 8d0d714
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
id: branch

- name: Set up Go 1.21
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: 1.21.x
id: go
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish

on:
release:
types: [published]

jobs:
Publish:
runs-on: ubuntu-22.04
name: Publish to docker repository
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Docker registry login
uses: docker/login-action@v2
with:
registry: ${{ secrets.DOCKER_REPO }}
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PSWD }}
logout: true

- name: Get Release Tag
id: get_release_tag
run: echo "::set-output name=tag::${{ github.event.release.tag_name }}"

- name: Publish Docker image
uses: docker/build-push-action@v4
with:
context: ${{ github.workspace }}
push: true
tags: docker.eu1.hsdp.io/reporting:${{ steps.get_release_tag.outputs.tag }}

0 comments on commit 8d0d714

Please sign in to comment.