-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (54 loc) · 2.02 KB
/
docker-publish.yaml
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
55
56
57
58
59
60
61
62
name: Build and publish a steampipe and powerpipe images to ghcr.io
on:
# publish on releases, e.g. v2.1.13 (image tagged as "2.1.13" - "v" prefix is removed)
# release:
# types: [ published ]
push:
branches:
- 'main'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}-terraform-import
jobs:
build-and-push-balcony-terraform-import-docker-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: steampipemeta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/steampipe
- name: Build and push Docker image -- steampipe
uses: docker/build-push-action@v4
with:
context: ./steampipe
push: true
tags: ${{ steps.steampipemeta.outputs.tags }}
labels: ${{ steps.steampipemeta.outputs.labels }}
file: ./steampipe/Dockerfile
build-args: STEAMPIPE_BINARY_DOWNLOAD_URL=https://github.com/turbot/steampipe/releases/download/v0.24.2/steampipe_linux_amd64.tar.gz
- name: Extract metadata (tags, labels) for Docker
id: powerpipemeta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/powerpipe
- name: Build and push Docker image -- powerpipe
uses: docker/build-push-action@v4
with:
context: ./powerpipe
push: true
tags: ${{ steps.powerpipemeta.outputs.tags }}
labels: ${{ steps.powerpipemeta.outputs.labels }}
file: ./powerpipe/Dockerfile
build-args: POWERPIPE_BINARY_DOWNLOAD_URL=https://github.com/turbot/powerpipe/releases/download/v0.4.4/powerpipe.linux.amd64.tar.gz