Skip to content

Commit

Permalink
Only include necessary changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwr18 committed Sep 2, 2024
1 parent cd491ae commit f1b3961
Showing 1 changed file with 33 additions and 33 deletions.
66 changes: 33 additions & 33 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
name: Continuous Deployment

on:
pull_request:
push:
branches: [ main ]

jobs:
# docker_push:
# runs-on: ubuntu-latest
docker_push:
runs-on: ubuntu-latest

# steps:
# - name: Checkout repository
# uses: actions/checkout@v3
steps:
- name: Checkout repository
uses: actions/checkout@v3

# # GitHub Actions do not expose the commit date, so we need to
# # store it in an env variable ourselves.
# - name: Get commit date
# id: git_commit_date
# run: "echo GIT_COMMIT_DATE=$(git log -1 --format=%cd --date=iso-strict ${{ github.sha }}) >> $GITHUB_ENV"
# GitHub Actions do not expose the commit date, so we need to
# store it in an env variable ourselves.
- name: Get commit date
id: git_commit_date
run: "echo GIT_COMMIT_DATE=$(git log -1 --format=%cd --date=iso-strict ${{ github.sha }}) >> $GITHUB_ENV"

# - name: Set up QEMU
# uses: docker/setup-qemu-action@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

# - name: Login to DockerHub
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# - name: Build and push
# id: docker_build
# uses: docker/build-push-action@v4
# with:
# context: .
# push: true
# tags: tactilenews/hundred-eyes:latest
# build-args: |
# git_commit_sha=${{ github.sha }}
# git_commit_date=${{ env.GIT_COMMIT_DATE }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: tactilenews/hundred-eyes:latest
build-args: |
git_commit_sha=${{ github.sha }}
git_commit_date=${{ env.GIT_COMMIT_DATE }}
# - name: Image digest
# run: echo ${{ steps.docker_build.outputs.digest }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

deploy:
# needs: [docker_push]
needs: [docker_push]
runs-on: ubuntu-latest
concurrency: staging_environment

Expand Down

0 comments on commit f1b3961

Please sign in to comment.