Skip to content

Commit f627ac4

Browse files
Merge pull request #14 from juroteam/chore/SRE-146/update-scm-pipeline
chore: [SRE-146] Update scm-backup image pipeline
2 parents 898c7ae + 44d3f9d commit f627ac4

File tree

1 file changed

+18
-19
lines changed

1 file changed

+18
-19
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Main CI
33

44
on:
55
push:
6-
tags: [ '*' ]
6+
tags: ['*']
77
workflow_dispatch:
88

99
concurrency:
@@ -16,29 +16,28 @@ jobs:
1616
outputs:
1717
version: ${{ steps.set-version.outputs.version }}
1818
steps:
19-
-
20-
uses: actions/checkout@v4
21-
-
22-
name: Set Version
19+
- uses: actions/checkout@v4
20+
21+
- name: Set Version
2322
id: set-version
2423
run: |
2524
VERSION=${GITHUB_REF#refs/tags/}
2625
[[ ${VERSION} =~ "refs/heads/" ]] && VERSION="${GITHUB_SHA::7}"
27-
echo "::set-output name=version::${VERSION}"
28-
-
29-
name: Set up Docker Buildx
26+
echo "version=$VERSION" >> $GITHUB_OUTPUT
27+
28+
- name: Set up Docker Buildx
3029
uses: docker/setup-buildx-action@v3
31-
-
32-
name: Login to GitHub Container Registry
33-
uses: docker/login-action@v3
30+
31+
- name: Login to Docker Hub
32+
uses: docker/login-action@v2
3433
with:
35-
registry: ghcr.io
36-
username: ${{ github.actor }}
37-
password: ${{ secrets.GITHUB_TOKEN }}
38-
-
39-
name: Build and Push Docker Image
40-
uses: docker/build-push-action@v5
34+
username: ${{ secrets.DOCKERHUB_USERNAME }}
35+
password: ${{ secrets.DOCKERHUB_TOKEN }}
36+
37+
- name: Build and Push Docker Image
38+
uses: docker/build-push-action@v4
4139
env:
40+
DOCKERHUB_NAMESPACE: juroapp
4241
APP_NAME: scm-backup
4342
with:
4443
file: Dockerfile
@@ -47,5 +46,5 @@ jobs:
4746
cache-to: type=gha,scope=${{ github.workflow }}
4847
cache-from: type=gha,scope=${{ github.workflow }}
4948
tags: |
50-
ghcr.io/${{ github.repository_owner }}/${{ env.APP_NAME }}:latest
51-
ghcr.io/${{ github.repository_owner }}/${{ env.APP_NAME }}:${{ steps.set-version.outputs.version }}
49+
${{ env.DOCKERHUB_NAMESPACE }}/${{ env.APP_NAME }}:${{ steps.set-version.outputs.version }}
50+
${{ env.DOCKERHUB_NAMESPACE }}/${{ env.APP_NAME }}:latest

0 commit comments

Comments
 (0)