-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (48 loc) · 1.91 KB
/
main.yaml
File metadata and controls
50 lines (48 loc) · 1.91 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Build and Publish Docker Image
on:
push:
branches:
- dev
jobs:
build-and-publish:
name: Build and publish app image
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' }}
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Generate tag
run: |
echo "TAG=$(date '+%Y%m%d')" >> $GITHUB_ENV
- name: Build and publish Pubgrade image
id: pubgrade-image
uses: philips-software/docker-ci-scripts@v5.0.0
with:
dockerfile: .
image-name: "pubgrade"
tags: "latest ${{ env.TAG }}"
push-branches: "{{ github.event.repository.default_branch }}$"
env:
REGISTRY_USERNAME: ${{ secrets.DOCKERHUB_LOGIN }}
REGISTRY_TOKEN: "${{ secrets.DOCKERHUB_TOKEN }}"
DOCKER_ORGANIZATION: ${{ secrets.DOCKERHUB_ORG }}
GITHUB_ORGANIZATION: ${{ github.repository_owner }}
- name: Build and publish Pubgrade-Updater image
id: pubgrade-updater-image
uses: philips-software/docker-ci-scripts@v5.0.0
with:
dockerfile: build-complete-updater/Dockerfile
image-name: "pubgrade-updater"
tags: "latest ${{ env.TAG }}"
push-branches: "{{ github.event.repository.default_branch }}$"
env:
REGISTRY_USERNAME: ${{ secrets.DOCKERHUB_LOGIN }}
REGISTRY_TOKEN: "${{ secrets.DOCKERHUB_TOKEN }}"
DOCKER_ORGANIZATION: ${{ secrets.DOCKERHUB_ORG }}
GITHUB_ORGANIZATION: ${{ github.repository_owner }}
- name: Verify that image was pushed
run: |
echo "Push indicator: ${{ steps.docker.outputs.push-indicator }}"
echo "# Set to 'true' if image was pushed, empty string otherwise"
test "${{ steps.pubgrade-image.outputs.push-indicator }}" == "true"
test "${{ steps.pubgrade-updater-image.outputs.push-indicator }}" == "true"