mirror of
https://github.com/phusion/baseimage-docker.git
synced 2026-03-26 12:29:07 +00:00
61 lines
1.8 KiB
YAML
61 lines
1.8 KiB
YAML
name: Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- move-to-github-actions
|
|
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
if: "!contains(github.event.head_commit.message, '[ci-skip]')"
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Prepare
|
|
id: prep
|
|
run: |
|
|
DOCKER_IMAGE=phusion/baseimage
|
|
VERSION=focal-test
|
|
GIT_BRANCH=${GITHUB_REF##*/}
|
|
TAGS="${DOCKER_IMAGE}:${GIT_BRANCH}"
|
|
|
|
# Set output parameters.
|
|
|
|
echo ::set-output name=tags::${TAGS}
|
|
echo ::set-output name=branch::${GIT_BRANCH}
|
|
echo ::set-output name=docker_image::${DOCKER_IMAGE}
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v1
|
|
with:
|
|
platforms: amd64,arm64
|
|
|
|
- name: Set up Docker Buildx
|
|
id: buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
with:
|
|
install: true
|
|
version: latest
|
|
driver-opts: image=moby/buildkit:latest
|
|
|
|
- name: Login to Docker Hub
|
|
if: github.event_name != 'pull_request'
|
|
uses: docker/login-action@v1
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
- name: Build and Push
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
build-args: VERSION=focal-1.0.0-test
|
|
builder: ${{ steps.buildx.outputs.name }}
|
|
context: image
|
|
platforms: amd64,arm64
|
|
push: true
|
|
tags: ${{ steps.prep.outputs.tags }}
|