Skip to content

Commit c8f7b0e

Browse files
Update Workflows
1 parent 73218ed commit c8f7b0e

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

.github/workflows/pull.yml renamed to .github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will build a golang project
22
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
33

4-
name: Pull Request
4+
name: continuous integration
55

66
on:
77
push:

.github/workflows/tag.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: tag new release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
jobs:
9+
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
packages: write
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
with:
20+
ref: "${{ github.ref_name }}"
21+
22+
- name: Login to GitHub Container Registry
23+
uses: docker/login-action@v1
24+
with:
25+
registry: ghcr.io
26+
username: ${{ github.actor }}
27+
password: ${{ secrets.GITHUB_TOKEN }}
28+
29+
- name: Extract metadata (tags, labels) for Docker
30+
id: meta
31+
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
32+
with:
33+
images: ghcr.io/pauljamescleary/go-rest-postgres
34+
35+
- name: Build and push Docker image
36+
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
37+
with:
38+
context: backend
39+
push: true
40+
tags: ${{ steps.meta.outputs.tags }}
41+
labels: ${{ steps.meta.outputs.labels }}
42+

0 commit comments

Comments
 (0)