Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

ci(deps): update docker/login-action action to v3 #81

ci(deps): update docker/login-action action to v3

ci(deps): update docker/login-action action to v3 #81

Workflow file for this run

name: ci
on: [push,workflow_dispatch]
jobs:
docker:
runs-on: self-hosted
steps:
- name: Login to GCR
uses: docker/login-action@v3
with:
registry: eu.gcr.io
username: _json_key
password: ${{ secrets.GCR_REGISTRY_SECRET }}
- name: Checkout GitHub Action Repo
uses: actions/checkout@v3
with:
repository: xcnt/ghaction-docker-meta
ref: master
token: ${{ secrets.CI_AUTH_TOKEN }} # stored in GitHub secrets
path: .github/actions/docker-meta
- name: Docker meta
id: docker_meta
uses: ./.github/actions/docker-meta
with:
images: |
eu.gcr.io/xcnt-infrastructure/kubernetes-update-manager-build
- name: Create Docker Context
run: docker context create buildx
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
with:
endpoint: buildx
- name: Build
id: docker_build
uses: docker/build-push-action@v4
with:
push: true
tags: ${{ steps.docker_meta.outputs.buildTags }}
cache-from: type=registry,ref=${{ steps.docker_meta.outputs.cacheTag }}
cache-to: type=inline
docker_test:
runs-on: self-hosted
steps:
- name: Login to GCR
uses: docker/login-action@v3
with:
registry: eu.gcr.io
username: _json_key
password: ${{ secrets.GCR_REGISTRY_SECRET }}
- name: Checkout GitHub Action Repo
uses: actions/checkout@v3
with:
repository: xcnt/ghaction-docker-meta
ref: master
token: ${{ secrets.CI_AUTH_TOKEN }} # stored in GitHub secrets
path: .github/actions/docker-meta
- name: Docker meta
id: docker_meta
uses: ./.github/actions/docker-meta
with:
images: |
eu.gcr.io/xcnt-infrastructure/kubernetes-update-manager-build-test
- name: Create Docker Context
run: docker context create buildx
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
with:
endpoint: buildx
- name: Build
id: docker_build
uses: docker/build-push-action@v4
with:
push: true
file: Dockerfile-test
tags: ${{ steps.docker_meta.outputs.buildTags }}
cache-from: type=registry,ref=${{ steps.docker_meta.outputs.cacheTag }}
cache-to: type=inline
lint:
runs-on: self-hosted
needs: [docker_test]
timeout-minutes: 30
steps:
- name: Login to GCR
uses: docker/login-action@v3
with:
registry: eu.gcr.io
username: _json_key
password: ${{ secrets.GCR_REGISTRY_SECRET }}
- name: Checkout GitHub Action Repo
uses: actions/checkout@v3
with:
repository: xcnt/ghaction-docker-meta
ref: master
token: ${{ secrets.CI_AUTH_TOKEN }} # stored in GitHub secrets
path: .github/actions/docker-meta
- name: Docker meta
id: docker_meta
uses: ./.github/actions/docker-meta
with:
images: |
eu.gcr.io/xcnt-infrastructure/kubernetes-update-manager-build-test
- uses: actions/checkout@v3
- name: Run Linter
run: |
docker run --rm ${{ steps.docker_meta.outputs.buildTag }} make lint
tests:
runs-on: self-hosted
needs: [docker_test]
timeout-minutes: 30
steps:
- name: Login to GCR
uses: docker/login-action@v3
with:
registry: eu.gcr.io
username: _json_key
password: ${{ secrets.GCR_REGISTRY_SECRET }}
- name: Checkout GitHub Action Repo
uses: actions/checkout@v3
with:
repository: xcnt/ghaction-docker-meta
ref: master
token: ${{ secrets.CI_AUTH_TOKEN }} # stored in GitHub secrets
path: .github/actions/docker-meta
- name: Docker meta
id: docker_meta
uses: ./.github/actions/docker-meta
with:
images: |
eu.gcr.io/xcnt-infrastructure/kubernetes-update-manager-build-test
- uses: actions/checkout@v3
- name: Run Unit Tests
run: |
docker run --rm ${{ steps.docker_meta.outputs.buildTag }} make xunit
publish-to-docker:
runs-on: self-hosted
needs: [docker, lint, tests]
steps:
- name: Login to GCR
uses: docker/login-action@v3
with:
registry: eu.gcr.io
username: _json_key
password: ${{ secrets.GCR_REGISTRY_SECRET }}
- name: Checkout GitHub Action Repo
uses: actions/checkout@v3
with:
repository: xcnt/ghaction-docker-meta
ref: master
token: ${{ secrets.CI_AUTH_TOKEN }} # stored in GitHub secrets
path: .github/actions/docker-meta
- name: Docker meta
id: docker_meta
uses: ./.github/actions/docker-meta
with:
images: |
eu.gcr.io/xcnt-infrastructure/kubernetes-update-manager-build
- name: Docker meta publish
id: docker_meta_publish
uses: ./.github/actions/docker-meta
with:
images: |
eu.gcr.io/xcnt-infrastructure/kubernetes-update-manager
- name: Create Docker Context
run: docker context create buildx
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
with:
endpoint: buildx
- name: Build
id: docker_build
uses: docker/build-push-action@v4
with:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta_publish.outputs.tags }}
labels: ${{ steps.docker_meta_publish.outputs.labels }}
cache-from: type=registry,ref=${{ steps.docker_meta.outputs.buildTag }}
cache-to: type=inline