-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (40 loc) · 1.48 KB
/
docker.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
name: Create and publish a Docker image
# Configures this workflow to run every time a change is pushed to the branch called `release`.
# on:
# release:
# types: [published]
on:
push:
branches: ["build"]
# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
jobs:
build-and-push-image:
runs-on: ubuntu-latest
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
permissions:
contents: read
packages: write
#
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: true
tags: vnguyen/openbeta-media-server:latest
# - uses: "google-github-actions/auth@v1"
# with:
# workload_identity_provider: "projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider"
# service_account: "[email protected]"
# - id: "deploy"
# uses: "google-github-actions/deploy-cloudrun@v1"
# with:
# service: "media-server"
# image: "gcr.io/${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}"