-
Notifications
You must be signed in to change notification settings - Fork 74
31 lines (25 loc) · 989 Bytes
/
release.yml
File metadata and controls
31 lines (25 loc) · 989 Bytes
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
name: release
on:
create:
tags:
- v*
env:
APP_IMAGE_NAME: hexletcomponents/devops-example-app
CADDY_IMAGE_NAME: hexletcomponents/devops-example-caddy
jobs:
docker:
runs-on: ubuntu-latest
steps:
# - uses: actions/checkout@v2
# - uses: docker/setup-qemu-action@v1
# - uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- run: docker pull ${{ env.APP_IMAGE_NAME }}:latest
- run: docker tag ${{ env.APP_IMAGE_NAME }}:latest ${{ env.APP_IMAGE_NAME }}:${{ github.ref_name }}
- run: docker push ${{ env.APP_IMAGE_NAME }}:${{ github.ref_name }}
- run: docker pull ${{ env.CADDY_IMAGE_NAME }}:latest
- run: docker tag ${{ env.CADDY_IMAGE_NAME }}:latest ${{ env.CADDY_IMAGE_NAME }}:${{ github.ref_name }}
- run: docker push ${{ env.CADDY_IMAGE_NAME }}:${{ github.ref_name }}