-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (60 loc) · 1.93 KB
/
publish-docker-an.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
55
56
57
58
59
60
61
62
63
64
65
66
name: Publish Action Network CLI images
on:
push:
branches:
- "release/*"
- "feature/*"
- "hotfix/*"
tags:
- v*
paths:
- "action-network/cli/**"
workflow_call:
secrets:
DOCKER_USERNAME:
required: true
DOCKER_PASSWORD:
required: true
GOOGLE_APPLICATION_CONTENT:
required: true
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
# - name: Login to DockerHub
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# - name: Create Google Credentials JSON
# id: create-json
# uses: jsdaniell/[email protected]
# with:
# name: "gac.json"
# json: ${{ secrets.GOOGLE_APPLICATION_CONTENT }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: ./action-network
push: true
tags: ghcr.io/nossas/bonde-action-network:latest
build-args: |
GOOGLE_APPLICATION_CONTENT=${{ secrets.GOOGLE_APPLICATION_CONTENT }}
# - name: Build and Publish latest Github Container image
# uses: VaultVulp/[email protected]
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }} # Provide GITHUB_TOKEN to login into the GitHub Packages
# image-name: nossas/bonde-action-network # Provide only Docker image name, tag will be automatically set to latest
# image-tag: latest