Skip to content

Commit

Permalink
Merge pull request #1431 from hairyhenderson/enable-ci-3.11.x
Browse files Browse the repository at this point in the history
Enable CI for 3.11.x branch
  • Loading branch information
hairyhenderson committed Jun 18, 2022
2 parents a7685b1 + f5fab44 commit 17a15c0
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
@@ -1,9 +1,9 @@
name: Build
on:
push:
branches: [ master ]
branches: [ main, 3.11.x]
pull_request:
branches: [ master ]
branches: [ main, 3.11.x ]

jobs:
linux-build:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Expand Up @@ -13,10 +13,10 @@ name: "CodeQL"

on:
push:
branches: [ master ]
branches: [ main, 3.11.x ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
branches: [ main, 3.11.x ]
schedule:
- cron: '42 18 * * 0'

Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/docker.yml
@@ -1,9 +1,9 @@
name: Docker Build
on:
push:
branches: [ master ]
branches: [ main, 3.11.x ]
pull_request:
branches: [ master ]
branches: [ main, 3.11.x ]

jobs:
docker-build:
Expand Down Expand Up @@ -48,34 +48,34 @@ jobs:
fi
echo $GITHUB_ENV
if: github.repository == 'hairyhenderson/gomplate'
- name: Build & Push (non-master)
- name: Build & Push (non-main)
run: |
set -ex
make docker-multi COMMIT=${{ github.sha }} DOCKER_REPO=localhost:5000/gomplate BUILDX_ACTION=--push
docker buildx imagetools create --dry-run -t localhost:5000/gomplate:dev localhost:5000/gomplate:latest
docker buildx imagetools create --dry-run -t localhost:5000/gomplate:dev-slim localhost:5000/gomplate:slim
docker buildx imagetools create --dry-run -t localhost:5000/gomplate:dev-alpine localhost:5000/gomplate:alpine
if: github.repository != 'hairyhenderson/gomplate' || (github.ref != 'refs/heads/master' && env.is_tag != 'true')
if: github.repository != 'hairyhenderson/gomplate' || (github.ref != 'refs/heads/main' && env.is_tag != 'true')
- name: Login to GHCR
uses: docker/login-action@v2.0.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
if: github.repository == 'hairyhenderson/gomplate' && (github.ref == 'refs/heads/master' || env.is_tag == 'true')
if: github.repository == 'hairyhenderson/gomplate' && (github.ref == 'refs/heads/main' || env.is_tag == 'true')
- name: Login to DockerHub
uses: docker/login-action@v2.0.0
with:
# NOTE: DOCKERHUB_TOKEN and DOCKERHUB_USERNAME must be present in https://github.com/hairyhenderson/gomplate/settings
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
if: github.repository == 'hairyhenderson/gomplate' && (github.ref == 'refs/heads/master' || env.is_tag == 'true')
- name: Build & Push (master)
if: github.repository == 'hairyhenderson/gomplate' && (github.ref == 'refs/heads/main' || env.is_tag == 'true')
- name: Build & Push (main)
run: |
make docker-multi COMMIT=${{ github.sha }} DOCKER_REPO=hairyhenderson/gomplate BUILDX_ACTION=--push
make docker-multi COMMIT=${{ github.sha }} DOCKER_REPO=ghcr.io/hairyhenderson/gomplate BUILDX_ACTION=--push
if: github.repository == 'hairyhenderson/gomplate' && github.ref == 'refs/heads/master'
if: github.repository == 'hairyhenderson/gomplate' && github.ref == 'refs/heads/main'
- name: Build & Push (tagged release)
run: |
make docker-multi COMMIT=${{ github.sha }} DOCKER_REPO=hairyhenderson/gomplate BUILDX_ACTION=--push
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/image-scan.yml
@@ -1,9 +1,9 @@
name: Docker Image Scan
on:
push:
branches: [ master ]
branches: [ main, 3.11.x ]
pull_request:
branches: [ master ]
branches: [ main, 3.11.x ]

jobs:
docker-build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/label.yml
Expand Up @@ -2,7 +2,7 @@ name: Labeler
on:
pull_request_target:
types: [ opened ]
branches: [ master ]
branches: [ main, 3.11.x ]

jobs:
label:
Expand Down

0 comments on commit 17a15c0

Please sign in to comment.