hacktoberfestorganizrnginxthemedark-themesonarrradarrplexdark-modecustom-csscssthemes-customthemes-csssubfilterguacamoleskinsombilidarrdocker-modsdark-themes
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
2.0 KiB
64 lines
2.0 KiB
name: docker build
|
|
on:
|
|
release:
|
|
types:
|
|
- released
|
|
workflow_dispatch:
|
|
inputs:
|
|
branch:
|
|
description: 'Select branch'
|
|
required: true
|
|
type: choice
|
|
options:
|
|
- testing
|
|
tag:
|
|
description: 'Add a tag'
|
|
push:
|
|
branches:
|
|
- testing
|
|
paths-ignore:
|
|
- '.github/**'
|
|
jobs:
|
|
push_to_ghcr_io:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Get the version
|
|
id: get_version
|
|
run: echo ::set-output name=VERSION::${{ github.event.release.tag_name }}
|
|
- name: Set current date as env variable
|
|
id: date_time
|
|
run: echo ::set-output name=NOW::$(date +'%Y-%m-%dT%H:%M:%S')
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v1
|
|
- name: Set up Docker Buildx
|
|
id: buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
- name: Docker meta
|
|
id: metadata # you'll use this in the next step
|
|
uses: docker/metadata-action@v3
|
|
with:
|
|
# list of Docker images to use as base name for tags
|
|
images: |
|
|
ghcr.io/gilbn/theme.park
|
|
# Docker tags based on the following events/attributes
|
|
tags: |
|
|
testing
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v1
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GH_PAT }}
|
|
- name: build&push testing
|
|
if: ${{ github.ref == 'refs/heads/testing' || github.event.inputs.branch == 'testing' }}
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
context: .
|
|
platforms: linux/amd64,linux/arm/v8
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
tags: ${{ steps.metadata.outputs.tags }}
|
|
labels: ${{ steps.metadata.outputs.labels }}
|
|
|