This commit is contained in:
parent
084388d3b8
commit
bed03dd1ee
@ -1,33 +1,35 @@
|
|||||||
name: build image
|
name: build image
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build image:
|
build image:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
steps:
|
||||||
image: catthehacker/ubuntu:act-latest
|
- name: code checkout
|
||||||
steps:
|
uses: actions/checkout@v4.1.6
|
||||||
- name: code checkout
|
- name: docker login
|
||||||
uses: actions/checkout@v3
|
uses: docker/login-action@v2
|
||||||
- name: docker login
|
with:
|
||||||
uses: docker/login-action@v2
|
registry: registry.digitalocean.com
|
||||||
with:
|
username: ${{ secrets.DOCKER_REGISTRY_CREDS }}
|
||||||
registry: registry.digitalocean.com
|
password: ${{ secrets.DOCKER_REGISTRY_CREDS }}
|
||||||
username: ${{ secrets.DOCKER_REGISTRY_CREDS }}
|
- name: create tag
|
||||||
password: ${{ secrets.DOCKER_REGISTRY_CREDS }}
|
id: create-tag
|
||||||
- name: create tag
|
run: |
|
||||||
id: create-tag
|
tag=$(echo ${{ github.sha }} | cut -b 1-8)
|
||||||
run: |
|
echo "::set-output name=tag::$tag"
|
||||||
tag=$(echo ${{ github.sha }} | cut -b 1-8)
|
- name: build and push
|
||||||
echo "::set-output name=tag::$tag"
|
uses: docker/build-push-action@v5.3.0
|
||||||
- name: build and push
|
with:
|
||||||
uses: docker/build-push-action@master
|
platforms: linux/amd64
|
||||||
with:
|
push: true
|
||||||
platforms: linux/amd64
|
build-args: |
|
||||||
push: true
|
REGISTRY_DOCKER_HUB=${{ vars.REGISTRY_DOCKER_HUB }}
|
||||||
tags: |
|
REGISTRY_GCR=${{ vars.REGISTRY_GCR }}
|
||||||
registry.digitalocean.com/ssdocker/${{ github.repository }}:${{ steps.create-tag.outputs.tag }}
|
REGISTRY_SIMPLE_SYSTEMS=${{ vars.REGISTRY_SIMPLE_SYSTEMS }}
|
||||||
registry.digitalocean.com/ssdocker/${{ github.repository }}:latest
|
tags: |
|
||||||
|
registry.digitalocean.com/ssdocker/${{ github.repository }}:${{ steps.create-tag.outputs.tag }}
|
||||||
|
registry.digitalocean.com/ssdocker/${{ github.repository }}:latest
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# STEP 1: Build the website's files
|
ARG REGISTRY_DOCKER_HUB
|
||||||
FROM alpine:latest AS build-website
|
ARG REGISTRY_SIMPLE_SYSTEMS
|
||||||
|
FROM $REGISTRY_DOCKER_HUB/alpine:latest AS build-website
|
||||||
|
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
|
|
||||||
@ -12,8 +13,7 @@ RUN apk update && apk upgrade && \
|
|||||||
|
|
||||||
RUN hugo --minify
|
RUN hugo --minify
|
||||||
|
|
||||||
# STEP 2: Add static files to webserver image
|
FROM $REGISTRY_SIMPLE_SYSTEMS/simplesystems/static-web-server:609f2b47
|
||||||
FROM registry.digitalocean.com/ssdocker/simplesystems/static-web-server:latest
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user