-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tidy up automated Docker image builds
- Loading branch information
Showing
2 changed files
with
40 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,43 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
# WARNIING: Docker builds have been moved to Docker Hub using connected Git Hub credentials. | ||
# An Image is built and pushed to Docker Hub on every push to the main branch. | ||
|
||
name: Docker Build and Push | ||
# name: Docker Build and Push | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the main branch | ||
on: | ||
push: | ||
branches: [ main ] | ||
# # Controls when the action will run. Triggers the workflow on push or pull request | ||
# # events but only for the main branch | ||
# on: | ||
# push: | ||
# branches: [ main ] | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
# # A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
# jobs: | ||
# # This workflow contains a single job called "build" | ||
# build: | ||
# # The type of runner that the job will run on | ||
# runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
# # Steps represent a sequence of tasks that will be executed as part of the job | ||
# steps: | ||
# # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
# - name: Checkout repository | ||
# uses: actions/checkout@v4 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_ACCESS_TOKEN }} | ||
# - name: Login to Docker Hub | ||
# uses: docker/login-action@v3 | ||
# with: | ||
# username: ${{ secrets.DOCKER_USERNAME }} | ||
# password: ${{ secrets.DOCKER_ACCESS_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: spreedly/phasers-worksample | ||
# - name: Extract metadata (tags, labels) for Docker | ||
# id: meta | ||
# uses: docker/metadata-action@v5 | ||
# with: | ||
# images: spreedly/phasers-worksample | ||
|
||
- name: Build and push Docker image | ||
id: push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: true | ||
tags: latest | ||
# - name: Build and push Docker image | ||
# id: push | ||
# uses: docker/build-push-action@v5 | ||
# with: | ||
# context: . | ||
# push: true | ||
# tags: latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters