Skip to content

Commit

Permalink
workflow updated
Browse files Browse the repository at this point in the history
  • Loading branch information
CyanoFresh committed Aug 16, 2021
1 parent dc78ad5 commit abe7c43
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 78 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/cached.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: [Cached] Docker Build & Push on release

on:
release:
types: [published]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
# DOCKER_BUILDKIT: 1
# COMPOSE_DOCKER_CLI_BUILD: 1

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v2

# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v1

- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build the stack
run: docker-compose build

- name: Push the stack
run: docker-compose push
78 changes: 0 additions & 78 deletions .github/workflows/docker-compose-publish.yml

This file was deleted.

40 changes: 40 additions & 0 deletions .github/workflows/not-cached.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: [Not Cached] Docker Build & Push on release

on:
release:
types: [published]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build the stack
run: docker-compose build --build-arg BUILDKIT_INLINE_CACHE=1

- name: Push the stack
run: docker-compose push

0 comments on commit abe7c43

Please sign in to comment.