Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Tags for Docker Images #754

Merged
merged 7 commits into from
Jul 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/deploy-docker-tag.yml
Original file line number Diff line number Diff line change
@@ -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 changes: 2 additions & 4 deletions .github/workflows/deploy-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@ name: Docker Image CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:

build:

runs-on: ubuntu-latest
if: github.repository_owner == 'alshedivat'

steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -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:
Expand Down