-
Notifications
You must be signed in to change notification settings - Fork 5
28 lines (27 loc) · 1.11 KB
/
directus_publish_on_demand.yml
File metadata and controls
28 lines (27 loc) · 1.11 KB
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
name: Build and publish Directus CMS
on: workflow_dispatch
jobs:
build_and_push:
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v2
- name: Build image
run: docker build -t programmierbar/cms -f Dockerfile.directus .
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- name: Log in to DO Container Registry
run: doctl registry login --expiry-seconds 600
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d-%H-%M')"
- name: Tag images
run: |
docker tag programmierbar/cms registry.digitalocean.com/programmierbar/cms:latest
docker tag programmierbar/cms registry.digitalocean.com/programmierbar/cms:${{ steps.date.outputs.date }}
- name: Push images to DO Container Registry
run: |
docker push registry.digitalocean.com/programmierbar/cms:latest
docker push registry.digitalocean.com/programmierbar/cms:${{ steps.date.outputs.date }}