diff --git a/.github/workflows/galaxy_build.yml b/.github/workflows/galaxy_build.yml index b70edf9..75e8175 100644 --- a/.github/workflows/galaxy_build.yml +++ b/.github/workflows/galaxy_build.yml @@ -7,33 +7,27 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Fetch Vault Secret - id: fetch-vault-secret - uses: hashicorp/vault-action@v2 - with: - url: http://localhost:8200 - token: ${{ secrets.VAULT_TOKEN }} - secrets: | - /keyvalue/data/docker/hub pass | DOCKER_HUB_ACCESS_TOKEN ; - echo $DOCKER_HUB_ACCESS_TOKEN - /v1/keyvalue/data/docker/hub user | DOCKER_HUB_USERNAME ; - echo $DOCKER_HUB_USERNAME - - name: Set environment variables - run: | - echo "DOCKER_HUB_USERNAME=${{ steps.fetch-vault-secret.outputs.secrets.DOCKER_HUB_USERNAME }}" >> $GITHUB_ENV - echo "DOCKER_HUB_ACCESS_TOKEN=${{ steps.fetch-vault-secret.outputs.secrets.DOCKER_HUB_ACCESS_TOKEN }}" >> $GITHUB_ENV - + - name: Check out the repo + uses: actions/checkout@v4 + - name: Log in to Docker Hub uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a with: - username: ${{ env.DOCKER_HUB_USERNAME }} - password: ${{ env.DOCKER_HUB_ACCESS_TOKEN }} + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 + with: + images: my-docker-hub-namespace/my-docker-hub-repository + - 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 }}