-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (32 loc) · 1.06 KB
/
CI-Merge.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: CI-Merge
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASS }}
- name: Build the Docker image
id: build_image
run: |
docker build -t ${{ vars.DOCKERHUB_USERNAME }}/negar-frontend:latest .
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Push the Docker image
run: |
docker tag ${{ vars.DOCKERHUB_USERNAME }}/negar-frontend:latest ${{ vars.DOCKERHUB_USERNAME }}/negar-frontend:${{ steps.tag_version.outputs.new_tag }}
docker push ${{ vars.DOCKERHUB_USERNAME }}/negar-frontend:${{ steps.tag_version.outputs.new_tag }}