Skip to content

Commit

Permalink
🌟 feat: add action for tagging (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
nandiheath authored Mar 2, 2021
1 parent e79d857 commit b8e9942
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set env
run: echo "TAGS=kintohub/kinto-dashboard:${GITHUB_SHA},kintohub/kinto-dashboard:latest" >> $GITHUB_ENV
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
tags: kintohub/kinto-dashboard:latest
tags: ${{ env.TAGS }}

- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
26 changes: 26 additions & 0 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Tag Image

on:
push:
tags:
- 'v*.*.*'

jobs:
tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v2
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Tag Image
uses: kintoproj/kinto-github-actions/[email protected]
with:
from_tag: kintohub/kinto-dashboard:${{ github.sha }}
to_tag: kintohub/kinto-dashboard:${{ env.RELEASE_VERSION }}

0 comments on commit b8e9942

Please sign in to comment.