-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (28 loc) · 1001 Bytes
/
release.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
name: release
on:
create:
tags:
- v*
env:
APP_IMAGE_NAME: shlyapnikovan/rails-project-lvl2
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Push images
run: docker pull ${{ env.APP_IMAGE_NAME }}:latest
- name: Tagging
run: docker tag ${{ env.APP_IMAGE_NAME }}:latest ${{ env.APP_IMAGE_NAME }}:${{ github.ref_name }}
- name: Login DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Push image
run: docker push ${{ env.APP_IMAGE_NAME }}:${{ github.ref_name }}
- name: Pull Caddy
run: docker pull shlyapnikovan/caddy_rails_blog:latest
- name: Create tag
run: docker tag shlyapnikovan/caddy_rails_blog:latest shlyapnikovan/caddy_rails_blog:${{ github.ref_name }}
- name: Push Caddy
run: docker push shlyapnikovan/caddy_rails_blog:${{ github.ref_name }}