Skip to content

Commit

Permalink
Patching deploy docker GHA (#974)
Browse files Browse the repository at this point in the history
* patching docker tagged workflow
  • Loading branch information
AnomalRoil committed Apr 27, 2022
1 parent 09f7a2a commit 3231638
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/publish_tagged.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
name: "Publish tagged image"

on:
workflow_dispatch:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+(\\+**)?"
release:
types:
- created
tags:
- "v[0-9]+(\\.[0-9]+)*"
- "v[0-9]+.[0-9]+.[0-9]+(\\+**)?"

jobs:
tagged-deploy:
Expand All @@ -23,18 +27,9 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Get latest release version number
id: get_version
uses: battila7/get-version-action@d97fbc34ceb64d1f5d95f4dfd6dce33521ccccf5 # pin@v2
- name: Parse semver string
id: semver_parser
uses: booxmedialtd/ws-action-parse-semver@3576f3a20a39f8752fe0d8195f5ed384090285dc # pin@v1
with:
input_string: ${{ steps.get_version.outputs.version }}
version_extractor_regex: 'v(.*)$'
- name: Build and push tagged Docker image
run: |
docker build --build-arg major=${{ steps.semver_parser.outputs.major }} --build-arg minor=${{ steps.semver_parser.outputs.minor }} --build-arg patch=${{ steps.semver_parser.outputs.patch }} --build-arg gitCommit=`git rev-parse HEAD` -t drandorg/go-drand:`git describe --tags` .
docker build --build-arg gitCommit=`git rev-parse HEAD` -t drandorg/go-drand:`git describe --tags` .
echo $DOCKER_PWD | docker login -u $DOCKER_LOGIN --password-stdin
docker push drandorg/go-drand:`git describe --tags`
env:
Expand Down

0 comments on commit 3231638

Please sign in to comment.