Skip to content

Commit

Permalink
Update workflows to V2 (julienschmidt#55)
Browse files Browse the repository at this point in the history
* Update release workflow

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Update canary workflow

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Update .github/workflows/build_canary.yml

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* Update .github/workflows/build_canary.yml

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* Update .github/workflows/build_release.yml

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* Update .github/workflows/build_canary.yml

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* Update .github/workflows/build_release.yml

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* Update .github/workflows/build_release.yml

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* Remove output variables

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
  • Loading branch information
khaosdoctor and arschles committed Mar 8, 2021
1 parent 183b3d6 commit c99982f
Show file tree
Hide file tree
Showing 2 changed files with 145 additions and 48 deletions.
95 changes: 71 additions & 24 deletions .github/workflows/build_canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,61 +13,108 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Build and push operator image
uses: docker/build-push-action@v1.1.1
- name: Set up tags and refs
id: prep
run: |
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
- name: Set up Buildx
uses: docker/setup-buildx-action@v1

- name: Login to GHCR
uses: docker/login-action@v1
with:
# Username used to log in to a Docker registry. If not set then no login will occur
username: ${{ secrets.GHCR_AUTH_USER }}
username: ${{ github.repository_owner }}
# Password or personal access token used to log in to a Docker registry. If not set then no login will occur
password: ${{ secrets.GHCR_AUTH_PAT }}
# Server address of Docker registry. If not set then will default to Docker Hub
registry: ghcr.io

- name: Build and push operator image
uses: docker/build-push-action@v2
with:
# Docker repository to tag the image with
repository: ${{ secrets.GHCR_AUTH_USER }}/http-add-on-operator
# Automatically tags the built image with the git SHA
tag_with_sha: true
tags: canary
dockerfile: operator/Dockerfile
repository: ${{ github.repository_owner }}/http-add-on-operator
tags: canary,sha-${GITHUB_SHA::8}
labels: |
sh.keda.http.image.source=${{github.event.repository.html_url}}
sh.keda.http.image.created=${{steps.prep.outputs.created}}
sh.keda.http.image.revision=${{github.sha}}
file: operator/Dockerfile
context: .

build_interceptor:

runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- name: Build and push interceptor image
uses: docker/build-push-action@v1.1.1

- name: Set up tags and refs
id: prep
run: |
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
- name: Set up Buildx
uses: docker/setup-buildx-action@v1

- name: Login to GHCR
uses: docker/login-action@v1
with:
# Username used to log in to a Docker registry. If not set then no login will occur
username: ${{ secrets.GHCR_AUTH_USER }}
username: ${{ github.repository_owner }}
# Password or personal access token used to log in to a Docker registry. If not set then no login will occur
password: ${{ secrets.GHCR_AUTH_PAT }}
# Server address of Docker registry. If not set then will default to Docker Hub
registry: ghcr.io

- name: Build and push interceptor image
uses: docker/build-push-action@v2
with:
# Docker repository to tag the image with
repository: ${{ secrets.GHCR_AUTH_USER }}/http-add-on-interceptor
# Automatically tags the built image with the git SHA
tag_with_sha: true
tags: canary
dockerfile: interceptor/Dockerfile
repository: ${{ github.repository_owner }}/http-add-on-interceptor
tags: canary,sha-${GITHUB_SHA::8}
labels: |
sh.keda.http.image.source=${{github.event.repository.html_url}}
sh.keda.http.image.created=${{steps.prep.outputs.created}}
sh.keda.http.image.revision=${{github.sha}}
file: interceptor/Dockerfile
context: .

build_scaler:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- name: Build and push scaler image
uses: docker/build-push-action@v1.1.1

- name: Set up tags and refs
id: prep
run: |
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
- name: Set up Buildx
uses: docker/setup-buildx-action@v1

- name: Login to GHCR
uses: docker/login-action@v1
with:
# Username used to log in to a Docker registry. If not set then no login will occur
username: ${{ secrets.GHCR_AUTH_USER }}
username: ${{ github.repository_owner }}
# Password or personal access token used to log in to a Docker registry. If not set then no login will occur
password: ${{ secrets.GHCR_AUTH_PAT }}
# Server address of Docker registry. If not set then will default to Docker Hub
registry: ghcr.io

- name: Build and push scaler image
uses: docker/build-push-action@v2
with:
# Docker repository to tag the image with
repository: ${{ secrets.GHCR_AUTH_USER }}/http-add-on-scaler
# Automatically tags the built image with the git SHA
tag_with_sha: true
tags: canary
dockerfile: scaler/Dockerfile
repository: ${{ github.repository_owner }}/http-add-on-scaler
tags: canary,sha-${GITHUB_SHA::8}
labels: |
sh.keda.http.image.source=${{github.event.repository.html_url}}
sh.keda.http.image.created=${{steps.prep.outputs.created}}
sh.keda.http.image.revision=${{github.sha}}
file: scaler/Dockerfile
context: .
98 changes: 74 additions & 24 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,61 +12,111 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Build and push operator image
uses: docker/build-push-action@v1.1.1
- name: Set up tags and refs
id: prep
run: |
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
- name: Set up Buildx
uses: docker/setup-buildx-action@v1

- name: Login to GHCR
uses: docker/login-action@v1
with:
# Username used to log in to a Docker registry. If not set then no login will occur
username: ${{ secrets.GHCR_AUTH_USER }}
username: ${{ github.repository_owner }}
# Password or personal access token used to log in to a Docker registry. If not set then no login will occur
password: ${{ secrets.GHCR_AUTH_PAT }}
# Server address of Docker registry. If not set then will default to Docker Hub
registry: ghcr.io

- name: Build and push operator image
uses: docker/build-push-action@v2
with:
# Docker repository to tag the image with
repository: ${{ secrets.GHCR_AUTH_USER }}/http-add-on-operator
# Automatically tags the built image with the git SHA
tag_with_ref: true
tags: latest
dockerfile: operator/Dockerfile
repository: ${{ github.repository_owner }}/http-add-on-operator
tags: latest,${GITHUB_REF#refs/tags/}
labels: |
sh.keda.http.image.source=${{github.event.repository.html_url}}
sh.keda.http.image.created=${{steps.prep.outputs.created}}
sh.keda.http.image.revision=${{github.sha}}
sh.keda.http.image.release=${{github.ref}}
file: operator/Dockerfile
context: .

build_interceptor:

runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- name: Build and push interceptor image
uses: docker/build-push-action@v1.1.1

- name: Set up tags and refs
id: prep
run: |
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
- name: Set up Buildx
uses: docker/setup-buildx-action@v1

- name: Login to GHCR
uses: docker/login-action@v1
with:
# Username used to log in to a Docker registry. If not set then no login will occur
username: ${{ secrets.GHCR_AUTH_USER }}
username: ${{ github.repository_owner }}
# Password or personal access token used to log in to a Docker registry. If not set then no login will occur
password: ${{ secrets.GHCR_AUTH_PAT }}
# Server address of Docker registry. If not set then will default to Docker Hub
registry: ghcr.io

- name: Build and push interceptor image
uses: docker/build-push-action@v2
with:
# Docker repository to tag the image with
repository: ${{ secrets.GHCR_AUTH_USER }}/http-add-on-interceptor
# Automatically tags the built image with the git SHA
tag_with_ref: true
tags: latest
dockerfile: interceptor/Dockerfile
repository: ${{ github.repository_owner }}/http-add-on-interceptor
tags: latest,${GITHUB_REF#refs/tags/}
labels: |
sh.keda.http.image.source=${{github.event.repository.html_url}}
sh.keda.http.image.created=${{steps.prep.outputs.created}}
sh.keda.http.image.revision=${{github.sha}}
sh.keda.http.image.release=${{github.ref}}
file: interceptor/Dockerfile
context: .

build_scaler:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- name: Build and push scaler image
uses: docker/build-push-action@v1.1.1

- name: Set up tags and refs
id: prep
run: |
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
- name: Set up Buildx
uses: docker/setup-buildx-action@v1

- name: Login to GHCR
uses: docker/login-action@v1
with:
# Username used to log in to a Docker registry. If not set then no login will occur
username: ${{ secrets.GHCR_AUTH_USER }}
username: ${{ github.repository_owner }}
# Password or personal access token used to log in to a Docker registry. If not set then no login will occur
password: ${{ secrets.GHCR_AUTH_PAT }}
# Server address of Docker registry. If not set then will default to Docker Hub
registry: ghcr.io

- name: Build and push scaler image
uses: docker/build-push-action@v2
with:
# Docker repository to tag the image with
repository: ${{ secrets.GHCR_AUTH_USER }}/http-add-on-scaler
# Automatically tags the built image with the git SHA
tag_with_ref: true
tags: latest
dockerfile: scaler/Dockerfile
repository: ${{ github.repository_owner }}/http-add-on-scaler
tags: latest,${GITHUB_REF#refs/tags/}
labels: |
sh.keda.http.image.source=${{github.event.repository.html_url}}
sh.keda.http.image.created=${{steps.prep.outputs.created}}
sh.keda.http.image.revision=${{github.sha}}
sh.keda.http.image.release=${{github.ref}}
file: scaler/Dockerfile
context: .

0 comments on commit c99982f

Please sign in to comment.