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

View File

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