Updating build workflow #6

Merged
Fascinated merged 9 commits from development into master 2023-07-08 00:23:50 +00:00
Showing only changes of commit 06be77cb48 - Show all commits

@ -1,4 +1,5 @@
Actions name: Publish Docker Image (Development) name: Publish Docker Image (Development)
on: on:
push: push:
branches: branches:
@ -9,7 +10,7 @@ jobs:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:
- name: Checkout - name: Checkout
uses: https://github.com/actions/checkout@v3 uses: actions/checkout@v3
- name: Cache Docker - name: Cache Docker
uses: actions/cache@v3 uses: actions/cache@v3
@ -27,33 +28,34 @@ jobs:
echo "Done" echo "Done"
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: https://github.com/docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v2
- name: Login to Repo - name: Login to Repo
uses: https://github.com/docker/login-action@v2 uses: docker/login-action@v2
with: with:
username: ${{ secrets.REPO_USERNAME }} username: ${{ secrets.REPO_USERNAME }}
password: ${{ secrets.REPO_TOKEN }} password: ${{ secrets.REPO_TOKEN }}
- name: Restore Docker Build Cache - name: Restore Docker Build Cache
uses: actions/cache@v3 uses: actions/cache@v3
id: build-cache
with: with:
path: /tmp/.buildx-cache path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx key: ${{ runner.os }}-buildx
restore-keys: |
${{ runner.os }}-buildx
- name: Build and Push - name: Build and Push
uses: docker/build-push-action@v4 uses: docker/build-push-action@v4
with: with:
push: true push: true
context: . context: .
tags: fascinated/sharex-php-uploader:latest tags: fascinated/sharex-php-uploader:development
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
- name: Save Docker Build Cache - name: Save Docker Build Cache
uses: actions/cache@v3 if: steps.build-cache.outputs.cache-hit != 'true'
with: run: |
path: /tmp/.buildx-cache mkdir -p /tmp/.buildx-cache
key: ${{ runner.os }}-buildx cp -r /tmp/.buildx-cache/. /tmp/.buildx-cache-new
restore-keys: | rm -rf /tmp/.buildx-cache
${{ runner.os }}-buildx mv /tmp/.buildx-cache-new /tmp/.buildx-cache