Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use centralized github actions #22839

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
129 changes: 0 additions & 129 deletions .github/actions/context/action.yml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/actions/login-docker/action.yml

This file was deleted.

46 changes: 0 additions & 46 deletions .github/actions/login-gar/action.yml

This file was deleted.

15 changes: 8 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ concurrency:

env:
docs_artifact: docs
GAR_REGISTRY: us-docker.pkg.dev
GAR_IMAGE: moz-fx-amo-prod/amo-prod/addons-server

jobs:
context:
Expand All @@ -32,16 +34,14 @@ jobs:
outputs:
is_fork: ${{ steps.context.outputs.is_fork }}
is_release_master: ${{ steps.context.outputs.is_release_master }}
is_dependabot: ${{ steps.context.outputs.is_dependabot }}
is_default_branch: ${{ steps.context.outputs.is_default_branch }}
is_release_tag: ${{ steps.context.outputs.is_release_tag }}
docker_version: ${{ steps.context.outputs.docker_version }}

steps:
- uses: actions/checkout@v4
- name: Set context
id: context
uses: ./.github/actions/context
uses: mozilla/addons/.github/actions/context@main

build:
name: ${{ needs.context.outputs.is_fork == 'true' && 'Skip' || 'Build' }} CI Image
Expand All @@ -59,7 +59,7 @@ jobs:
- name: Login to Dockerhub
if: needs.context.outputs.is_fork == 'false'
id: docker_hub
uses: ./.github/actions/login-docker
uses: mozilla/addons/.github/actions/login-docker@main
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
Expand Down Expand Up @@ -285,7 +285,7 @@ jobs:

- name: Login to Dockerhub
id: docker_hub
uses: ./.github/actions/login-docker
uses: mozilla/addons/.github/actions/login-docker@main
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
Expand Down Expand Up @@ -317,8 +317,9 @@ jobs:

- name: Login to GAR
id: docker_gar
uses: ./.github/actions/login-gar
uses: mozilla/addons/.github/actions/login-gar@main
with:
registry: ${{ env.GAR_REGISTRY }}
service_account: ${{ secrets.GAR_PUSHER_SERVICE_ACCOUNT_EMAIL }}
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}

Expand All @@ -327,7 +328,7 @@ jobs:
uses: ./.github/actions/build-docker
with:
registry: ${{ steps.docker_gar.outputs.registry }}
image: ${{ steps.docker_gar.outputs.image }}
image: ${{ env.GAR_IMAGE }}
version: ${{ needs.context.outputs.docker_version }}
target: production
push: true
Loading