-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (28 loc) · 1.07 KB
/
build.yml
File metadata and controls
30 lines (28 loc) · 1.07 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
name: build-image
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# by definition the short_sha based tag never gets dirty (if built on github actions), see localbuild.sh
- name: Set short_sha tag
id: set_short_sha_tag_var
run: echo "::set-output name=val::$(git rev-parse --short=7 HEAD)"
# grab manually defined tag from localbuild.sh
- name: Set manual tag
id: set_manual_tag_var
run: echo "::set-output name=val::$(grep ^_MANUALLY_INCREMENTED_IMAGE_VERSION localbuild.sh | cut -d= -f2 | xargs)"
- name: Build and push Docker images
id: build_and_push_image
uses: docker/build-push-action@v1.1.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: ekgf/debian-awscli
tags: ${{ steps.set_short_sha_tag_var.outputs.val }}, ${{ steps.set_manual_tag_var.outputs.val }}
always_pull: true