You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
name: Build and Push Images
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "*"
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
env:
|
|
REGISTRY: ghcr.io
|
|
IMAGE_NAME: start-portainer-stack
|
|
|
|
jobs:
|
|
build-and-push-image:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Log in to the Container registry
|
|
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Extract metadata (tags, labels) for Docker
|
|
id: meta
|
|
uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a
|
|
with:
|
|
images: ${{ env.REGISTRY }}/chatton/${{ env.IMAGE_NAME }}
|
|
|
|
- name: Build and push Docker image
|
|
uses: docker/build-push-action@e551b19e49efd4e98792db7592c17c09b89db8d8
|
|
with:
|
|
context: scripts/portainer
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }} |