-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (45 loc) · 1.58 KB
/
deploy-image-manual-full.yaml
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
46
47
48
49
50
51
52
53
name: Build and Push Docker Image Manually(Full Package)
on:
workflow_run:
workflows: ["Build and Push Docker Image Manually(Core)"]
types:
- completed
jobs:
build-and-push-image:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: |
statgarten/dockerImage
- name: Set TAG env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Metadata
run: echo "container tag will be 'lastest' and '${{ env.RELEASE_VERSION }}'"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub/
uses: docker/#-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/#-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
tags: |
dao0312/statgarten:latest
dao0312/statgarten:${{ env.RELEASE_VERSION }}
ghcr.io/${{ github.repository_owner }}/statgarten:latest
ghcr.io/${{ github.repository_owner }}/statgarten:${{ env.RELEASE_VERSION }}