Add Tags for Docker Images (#754)
This commit is contained in:
parent
b6ea0d01ff
commit
99b14c436f
40
.github/workflows/deploy-docker-tag.yml
vendored
Normal file
40
.github/workflows/deploy-docker-tag.yml
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
name: Docker Image CI (Upload Tag)
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
-
|
||||
name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: amirpourmand/al-folio
|
||||
|
||||
- name: Login
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
6
.github/workflows/deploy-image.yml
vendored
6
.github/workflows/deploy-image.yml
vendored
@ -3,8 +3,6 @@ name: Docker Image CI
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
|
||||
@ -12,7 +10,7 @@ jobs:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'alshedivat'
|
||||
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
@ -24,7 +22,7 @@ jobs:
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
|
Loading…
Reference in New Issue
Block a user