30 lines
913 B
YAML
30 lines
913 B
YAML
name: Release
|
|
on:
|
|
push:
|
|
tags:
|
|
- '*'
|
|
|
|
jobs:
|
|
build_push:
|
|
runs-on: ubuntu-latest
|
|
container: docker:latest
|
|
env:
|
|
REGISTRY: git.gertjankrol.nl
|
|
IMAGE_NAMESPACE: docker/toolkit
|
|
steps:
|
|
- name: Install dependencies # not present in `docker` container but needed for `checkout` action
|
|
run: apk add --no-cache git nodejs
|
|
- name: Check out repository
|
|
uses: actions/checkout@v3
|
|
- name: Docker login
|
|
run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} https://${REGISTRY}
|
|
- name: Build and push
|
|
uses: actions/docker-build-push@v4
|
|
with:
|
|
push: true
|
|
tags:
|
|
- ${REGISTRY}/${IMAGE_NAMESPACE}:${{ github.ref_name }}
|
|
- ${REGISTRY}/${IMAGE_NAMESPACE}:latest
|
|
- name: Inspect image
|
|
run: ${REGISTRY}/${IMAGE_NAMESPACE}:${{ github.ref_name }}
|