-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from phplegacy/develop
Develop
- Loading branch information
Showing
3 changed files
with
71 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Build [develop] docker image | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the master branch | ||
push: | ||
branches: [ develop ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
|
||
build: | ||
name: Build and publish | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
gearman_version: [ '1.1.20' ] | ||
|
||
steps: | ||
- name: Prepare env variables | ||
run: | | ||
echo "BUILD_DATE=$(TZ=':UTC' date +'%Y-%m-%d %H:%M:%S (%Z)')" >> ${GITHUB_ENV} | ||
echo "BUILD_FINGERPRINT=${GITHUB_SHA::7}" >> ${GITHUB_ENV} | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GH_TOKEN }} | ||
|
||
- name: Build images and push to registry | ||
uses: docker/build-push-action@v3 | ||
with: | ||
platforms: linux/amd64 | ||
cache-from: type=gha, scope=${{ github.workflow }}-${{ matrix.gearman_version }} | ||
cache-to: type=gha, scope=${{ github.workflow }}-${{ matrix.gearman_version }}, mode=max | ||
context: . | ||
file: ./docker/Dockerfile | ||
build-args: | | ||
BUILD_DATE=${{ env.BUILD_DATE }} | ||
BUILD_FINGERPRINT=${{ env.BUILD_FINGERPRINT }} | ||
GEARMAN_VERSION=${{ matrix.gearman_version }} | ||
tags: | | ||
ghcr.io/phplegacy/gearman-docker:develop | ||
pull: true | ||
push: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters