-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (44 loc) · 1.45 KB
/
publish_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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
##################################################
# General
##################################################
env:
IMAGE_NAME: uupascal/rest-light
##################################################
# On Dev
##################################################
on:
push:
branches:
- dev
paths-ignore:
- '**.md'
- '.gitignore'
- '.doc/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
run: echo "${{ secrets.DOCKERHUB_PASSWORD }}" | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y.%m.%d')"
- name: Pull image to leverage cache
run: docker pull "$IMAGE_NAME:DEV-latest" || true
- name: Build the tagged Docker image
run: >
docker buildx build
--platform linux/arm/v6
--file Dockerfile
--push
--build-arg APP_VERSION="DEV-${{ steps.date.outputs.date }}"
--build-arg GITHUB_REPOSITORY
--tag "$IMAGE_NAME:DEV-${{ steps.date.outputs.date }}"
--tag "$IMAGE_NAME:DEV-latest" .