Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
adthrasher committed Jul 2, 2021
2 parents b6c7ebc + cb03bab commit bc4a14b
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 6 deletions.
32 changes: 26 additions & 6 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: Publish Docker image
on:
push:
branches:
release:
types: [published]

Expand All @@ -12,10 +10,32 @@ jobs:
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Push to Docker Hub
uses: docker/build-push-action@v1
-
name: Sanitize Repo Name for Tagging
run: echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]' | (read; echo REPO_LOWER=$REPLY) >> $GITHUB_ENV
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: stjude/xenocp
tag_with_ref: true
-
name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ secrets.GH_USERNAME }}
password: ${{ secrets.GH_TOKEN }}
- name: Build and Push
uses: docker/build-push-action@v2
with:
push: true
tags: |
ghcr.io/${{ env.REPO_LOWER }}:${{ github.event.release.tag_name }}
${{ env.REPO_LOWER }}:${{ github.event.release.tag_name }}
42 changes: 42 additions & 0 deletions .github/workflows/docker_branches.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Publish Docker image
on:
push:
branches-ignore:
- 'master'

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
-
name: Sanitize Repo Name for Tagging
run: echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]' | (read; echo REPO_LOWER=$REPLY) >> $GITHUB_ENV
-
name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REPO_LOWER }}
tags: |
type=ref,event=branch,prefix=branch-
type=ref,event=pr
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push to Docker Hub
uses: docker/build-push-action@v2
with:
push: true
tags: ${{ steps.meta.outputs.tags }}

0 comments on commit bc4a14b

Please sign in to comment.