Skip to content

Commit

Permalink
GitHub action test (#83)
Browse files Browse the repository at this point in the history
* Create DH_upload.yml

* Update DH_upload.yml

* Update DH_upload.yml

* Update DH_upload.yml

* Update DH_upload.yml

* Update DH_upload.yml

* Update DH_upload.yml

* Update DH_upload.yml

* Update DH_upload.yml

* Update DH_upload.yml

* Update DH_upload.yml

* Update DH_upload.yml

* Update and rename DH_upload.yml to DH_GHCR_upload.yml

* Update DH_GHCR_upload.yml

* Delete .github/workflows/GHCR_docker.yml

* Update DH_GHCR_upload.yml
  • Loading branch information
dthoward96 authored Sep 25, 2024
1 parent a08c840 commit c4a0d54
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 42 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/DH_GHCR_upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Create and publish docker image to DockerHub and GitHub Container Repository

on:
release:
types: [published]

jobs:
push_to_registry:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
attestations: write
id-token: write
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Log into GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: |
cdcgov/seqsender
ghcr.io/${{ github.repository }}
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
tags: |
cdcgov/seqsender:${{ github.ref_name }}
cdcgov/seqsender:latest
ghcr.io/cdcgov/seqsender:${{ github.ref_name }}
ghcr.io/cdcgov/seqsender:latest
labels: "Genomic sequence pipeline to automate the process of generating necessary submission files and batch uploading them to public databases."
42 changes: 0 additions & 42 deletions .github/workflows/GHCR_docker.yml

This file was deleted.

0 comments on commit c4a0d54

Please sign in to comment.