Skip to content

Commit

Permalink
Test GH action
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienPeloton committed May 28, 2024
1 parent 05f8ff9 commit cb2743f
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 1 deletion.
47 changes: 47 additions & 0 deletions .github/workflows/publish_docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Publish Docker image

on:
release:
types: [published]

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
attestations: write
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: julienpeloton/fink-ci

- name: Build and push Docker image
id: push
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}


- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM quay.io/centos/centos:stream9
2 changes: 1 addition & 1 deletion centos9stream/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fastavro==1.6.0
pyarrow==9.0.0
astropy
astroquery
fink_filters>=3.29
fink_filters>=3.30
git+https://github.com/astrolabsoftware/fink-science@5.8.1
fink-utils>=0.17.5
fink-spins>=0.3.8
Expand Down

0 comments on commit cb2743f

Please sign in to comment.