-
Notifications
You must be signed in to change notification settings - Fork 77
38 lines (32 loc) · 1.18 KB
/
docker-dev.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
38
name: Publish Dev Docker Image
on:
push:
branches:
- master
jobs:
push_dev_to_registry:
name: Push Development Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Extract Commit Hash
id: extract_hash
run: echo "::set-output name=hash::$(git rev-parse --short HEAD)"
- name: Get WebCalendar Version
run: echo "WEBCALENDAR_VERSION=$(./bump_version.sh -p)" >> $GITHUB_ENV
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
file: ./docker/Dockerfile-php8
push: true
tags: |
${{ secrets.DOCKER_HUB_USERNAME }}/webcalendar:${{ env.WEBCALENDAR_VERSION }}-${{ steps.extract_hash.outputs.hash }}-php8-apache-dev
${{ secrets.DOCKER_HUB_USERNAME }}/webcalendar:dev-php8-apache
${{ secrets.DOCKER_HUB_USERNAME }}/webcalendar:dev
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}