workflow
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
|
||||
name: Docker build and push
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Build and Test"]
|
||||
branches: ["main"]
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
docker-build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
IMAGE_NAME: docker_state_exporter
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GH_ACCESS_TOKEN }}
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: ./
|
||||
push: true
|
||||
tags: |
|
||||
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest
|
||||
|
||||
Reference in New Issue
Block a user