vagrant-vbox/.gitea/workflows/docker-publish.yaml
Jakub Filo a088868a80
All checks were successful
Build & publish images / build-and-push-image (git.plantroon.com/plantroon/vagrant-vbox, 6.1.44) (push) Successful in 1h40m27s
Build & publish images / build-and-push-image (git.plantroon.com/plantroon/vagrant-vbox, 7.0.8) (push) Successful in 4m20s
revert eeb847a7a2
revert Try the build without using a container
2023-12-09 19:17:31 +00:00

54 lines
1.5 KiB
YAML

name: Build & publish images
on: [push]
env:
REGISTRY: git.plantroon.com
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push-image:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
strategy:
fail-fast: false
matrix:
include:
- image: git.plantroon.com/plantroon/vagrant-vbox
version: 7.0.8
- image: git.plantroon.com/plantroon/vagrant-vbox
version: 6.1.44
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.CR_PAT }}
- name: Extract Docker metadata
id: meta
uses: https://github.com/docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ matrix.image }}
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
with:
context: .
push: true
tags: ${{ matrix.image }}:${{ matrix.version }}
labels: ${{ steps.meta.outputs.labels }}
build-args: VERSION=${{ matrix.version }}