forked from anmolnagpal/devops-machine
-
Notifications
You must be signed in to change notification settings - Fork 4
45 lines (40 loc) · 1.27 KB
/
enigma-docker.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
41
42
43
44
45
name: Enigma Docker Build and Publish.
on:
push:
tags: [ v* ]
jobs:
docker-build-publish:
runs-on: ubuntu-latest
permissions:
contents: 'read'
id-token: 'write'
env:
DOCKER_IMAGE: devops-machine
DOCKER_TAG: ghcr.io/${{ github.repository }}:${{ github.ref_name }}
PROVIDER: github
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build Docker Image
uses: clouddrove/[email protected]
with:
command: bake
DOCKER_IMAGE: ${{ env.DOCKER_IMAGE }}
DOCKER_TAG: ${{ env.DOCKER_TAG }}
DOCKERFILE_PATH: .docker/Dockerfile
GITHUB_USERNAME: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB }}
- name: Publish Docker Image
uses: clouddrove/[email protected]
with:
command: publish
DOCKER_IMAGE: ${{ env.DOCKER_IMAGE }}
DOCKER_TAG: ${{ env.DOCKER_TAG }}
DOCKERFILE_PATH: .docker/Dockerfile
GITHUB_USERNAME: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB }}