Skip to content

Commit aeea4ee

Browse files
authored
feat: Use a single workflow (#24)
This will allow us to make sure the container is built and pushed on main before publishing a release Signed-off-by: Dan Webb <[email protected]>
1 parent 790c36c commit aeea4ee

File tree

3 files changed

+22
-22
lines changed

3 files changed

+22
-22
lines changed

.github/workflows/publish.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name: Build & Publish container
33
'on':
44
push:
5+
branches: [main]
56
tags: [v**]
67
pull_request:
78
workflow_dispatch:
@@ -59,3 +60,23 @@ jobs:
5960
push: ${{ github.event_name != 'pull_request' }}
6061
tags: ${{ steps.meta.outputs.tags }}
6162
labels: ${{ steps.meta.outputs.labels }}
63+
64+
publish:
65+
runs-on: ubuntu-latest
66+
needs: [build_and_publish]
67+
if: github.ref == 'refs/heads/main'
68+
steps:
69+
- uses: actions/checkout@main
70+
71+
- name: Bump version and push tag
72+
id: tag_version
73+
uses: mathieudutour/[email protected]
74+
with:
75+
github_token: ${{ secrets.GITHUB_TOKEN }}
76+
77+
- name: Create a GitHub release
78+
uses: ncipollo/[email protected]
79+
with:
80+
tag: ${{ steps.tag_version.outputs.new_tag }}
81+
name: Release ${{ steps.tag_version.outputs.new_tag }}
82+
body: ${{ steps.tag_version.outputs.changelog }}

.github/workflows/release.yml

-21
This file was deleted.

action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ author: 'Jason Field'
44
description: 'Run yamllint on your yaml files with ease'
55
runs:
66
using: 'docker'
7-
image: docker://ghcr.io/actionshub/yamllint:v1.1.2
7+
image: docker://ghcr.io/actionshub/yamllint:v1.3.0
88
branding:
99
icon: 'edit-3'
1010
color: 'red'

0 commit comments

Comments
 (0)