78
.github/workflows/docker.yml
vendored
Normal file
78
.github/workflows/docker.yml
vendored
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
name: Docker CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker-build:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
arch: [amd64, arm64]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout project
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
username: wantguns
|
||||||
|
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
||||||
|
|
||||||
|
- name: Building the ${{ matrix.arch }} image
|
||||||
|
run: |
|
||||||
|
docker build . \
|
||||||
|
-t wantguns/bin:${{ matrix.arch }} \
|
||||||
|
--build-arg ARCH=${{ matrix.arch }}
|
||||||
|
mkdir -p artifacts/images
|
||||||
|
docker save wantguns/bin:${{ matrix.arch }} > artifacts/images/${{ matrix.arch }}.tar
|
||||||
|
|
||||||
|
- name: Pushing the ${{ matrix.arch }} image
|
||||||
|
run: |
|
||||||
|
docker push wantguns/bin:${{ matrix.arch }}
|
||||||
|
|
||||||
|
- name: Temporarily saving the image
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: docker-artifacts
|
||||||
|
path: artifacts/images
|
||||||
|
retention-days: 1
|
||||||
|
|
||||||
|
|
||||||
|
docker-push:
|
||||||
|
needs: docker-build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
username: wantguns
|
||||||
|
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
||||||
|
|
||||||
|
- name: Retrieve saved images
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: docker-artifacts
|
||||||
|
path: artifacts/images
|
||||||
|
|
||||||
|
- name: Docker load images
|
||||||
|
run: |
|
||||||
|
pushd artifacts/images
|
||||||
|
docker load < amd64.tar
|
||||||
|
docker load < arm64.tar
|
||||||
|
|
||||||
|
- name: Creating a multi-arch manifest
|
||||||
|
run: |
|
||||||
|
docker manifest create \
|
||||||
|
wantguns/bin:latest \
|
||||||
|
--amend wantguns/bin:amd64 \
|
||||||
|
--amend wantguns/bin:arm64
|
||||||
|
|
||||||
|
docker manifest annotate wantguns/bin:latest \
|
||||||
|
wantguns/bin:arm64 --arch arm64
|
||||||
|
|
||||||
|
- name: Push the manifest
|
||||||
|
run: |
|
||||||
|
docker manifest push wantguns/bin:latest
|
||||||
@@ -193,6 +193,6 @@ BIN_IDENT=false
|
|||||||
This pastebin:
|
This pastebin:
|
||||||
|
|
||||||
- does not use a database. It lacks non-essential features like password-protection / automatic deletion as a result of which, it can do completely fine with flat filesystems. As an upside (opinionated), it makes deploying it easier.
|
- does not use a database. It lacks non-essential features like password-protection / automatic deletion as a result of which, it can do completely fine with flat filesystems. As an upside (opinionated), it makes deploying it easier.
|
||||||
- uses server sided highlighting, which ensures that everything stays light and snappy at the server side.
|
- uses server sided highlighting, which ensures that everything stays light and snappy at the client side.
|
||||||
- uses very minimal frontend because a pastebin does not need it. It focuses (or atleast tries to) on getting things done in minimum amount of clicks.
|
- uses very minimal frontend because a pastebin does not need it. It focuses (or atleast tries to) on getting things done in minimum amount of clicks.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user