Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tf-build
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Benedikt Wildenhain
tf-build
Commits
dedad207
Commit
dedad207
authored
Apr 4, 2022
by
Austin Anderson
Browse files
Options
Downloads
Patches
Plain Diff
Add a workflow for handling branch-specific containers, if needed
parent
0f3df626
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
.github/workflows/docker-branch.yml
+66
-0
66 additions, 0 deletions
.github/workflows/docker-branch.yml
with
66 additions
and
0 deletions
.github/workflows/docker-branch.yml
0 → 100644
+
66
−
0
View file @
dedad207
name
:
Upload docker containers modified for release branches
on
:
workflow_dispatch
:
push
:
paths
:
-
'
.github/workflows/docker.yml'
-
'
tf_sig_build_dockerfiles/**'
-
'
!tf_sig_build_dockerfiles/README.md'
branches
:
# Branch should match the TF branch name
-
"
r[1-9].[0-9]+"
jobs
:
docker
:
runs-on
:
ubuntu-latest
strategy
:
matrix
:
python-version
:
[
python3.7
,
python3.8
,
python3.9
,
python3.10
]
steps
:
-
name
:
Checkout
uses
:
actions/checkout@v2
-
name
:
Set up Docker Buildx
uses
:
docker/setup-buildx-action@v1
-
name
:
Login to DockerHub
uses
:
docker/login-action@v1
with
:
username
:
${{ secrets.DOCKERHUB_USERNAME }}
password
:
${{ secrets.DOCKERHUB_TOKEN }}
-
name
:
Login to GCR
uses
:
docker/login-action@v1
with
:
registry
:
gcr.io
username
:
_json_key
password
:
${{ secrets.GCP_CREDS }}
-
name
:
Generate variables for cache busting and tag naming
run
:
|
echo "::set-output name=DATE::$(date +'%Y-%m-%d')"
# Converts r2.9 to just 2.9
echo "::set-output name=REF::$(echo $GITHUB_REF_NAME | sed 's/r//g')"
id
:
vars
-
name
:
Build and push
id
:
docker_build
uses
:
docker/build-push-action@v2
with
:
push
:
true
context
:
./tf_sig_build_dockerfiles
target
:
devel
build-args
:
|
PYTHON_VERSION=${{ matrix.python-version }}
CACHEBUSTER=${{ steps.vars.outputs.DATE }}
tags
:
|
tensorflow/build:${{ steps.vars.outputs.REF }}-${{ matrix.python-version }}
gcr.io/tensorflow-sigs/build:${{ steps.vars.outputs.REF }}-${{ matrix.python-version }}
cache-from
:
type=registry,ref=tensorflow/build:${{ steps.vars.outputs.REF }}-${{ matrix.python-version }}
cache-to
:
type=inline
-
name
:
Image digest
run
:
echo ${{ steps.docker_build.outputs.digest }}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment