Skip to content

Commit

Permalink
Semver tags (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
max-lobur committed Apr 27, 2023
1 parent 927e138 commit 3d9dc33
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 54 deletions.
54 changes: 0 additions & 54 deletions .github/workflows/release-branch.yaml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/release-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: release-branch
on:
push:
branches: [ main ]

permissions:
contents: write
id-token: write

jobs:
ci-readme:
uses: cloudposse/github-actions-workflows/.github/workflows/ci-readme.yml@main
with:
filter-mode: nofilter
suggestions: false

ci-codeowners:
uses: cloudposse/github-actions-workflows/.github/workflows/ci-codeowners.yml@main
with:
is_fork: false
secrets:
github_access_token: ${{ secrets.REPO_ACCESS_TOKEN }}

controller-release:
uses: cloudposse/github-actions-workflows/.github/workflows/controller-release.yml@main
needs: [ ci-readme, ci-codeowners ]
secrets:
github_access_token: ${{ secrets.REPO_ACCESS_TOKEN }} # Required to trigger tag workflow
36 changes: 36 additions & 0 deletions .github/workflows/tag-pushed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: tag-pushed

on:
push:
tags:
- 'v*'

jobs:
ci-build-push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ github.repository }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 3d9dc33

Please sign in to comment.